Skip to contentSkip to conversation

Win98: how to exchange data with Linux

Qemu-devel Mario Cazorzi 15 participants 45 messages Jul 12, 2004 – Jul 18, 2004

lore
Share & tools
lore
#0 lore raw

I have just installed Windows98 on my Linux machine (Suse 9.1 64bit, sata HD). Qemu works really very, very good.
The only thing I missed is the possibility to exchange data between the two OS. (I mean cut and paste).
Probably at the moment the only possibility is to make a fat32 partition so I can see it from Linux and from Windows too.
Is that the only solution (if I can spare so a partition I will be very happy).

mcz

Signature · 1 line
Powered by SuSe-amd64 Gnu/Linux
#1 lore raw
Quoted 8 lines · Mario Cazorzi

I have just installed Windows98 on my Linux machine (Suse 9.1 64bit, sata HD). Qemu works really very, very good.
The only thing I missed is the possibility to exchange data between the two OS. (I mean cut and paste).
Probably at the moment the only possibility is to make a fat32 partition so I can see it from Linux and from Windows too.
Is that the only solution (if I can spare so a partition I will be very happy).

Actually you can't mount a partition in Qemu that's not buried inside your .img file. At least no way I found yet.
You can use lomount to mount your .img partitions in Linux, this requires root access tho.
http://www.dad-answers.com/qemu/utilities/QEMU-HD-Mounter/

Btw, thanks dad for the very useful site. :)

-jm

#2 lore raw
Quoted 15 lines · Joe Menola
Quoted 8 lines · Mario Cazorzi

I have just installed Windows98 on my Linux machine (Suse 9.1 64bit, sata HD). Qemu works really very, very good.
The only thing I missed is the possibility to exchange data between the two OS. (I mean cut and paste).
Probably at the moment the only possibility is to make a fat32 partition so I can see it from Linux and from Windows too.
Is that the only solution (if I can spare so a partition I will be very happy).

Actually you can't mount a partition in Qemu that's not buried inside your .img file. At least no way I found yet.
You can use lomount to mount your .img partitions in Linux, this requires root access tho.
http://www.dad-answers.com/qemu/utilities/QEMU-HD-Mounter/

Quoted 4 lines

Btw, thanks dad for the very useful site. :)

-jm

This isn't safe though. It might work, but you run the risk of corrupting the partition in question (e.g. Linux updates the spare partition at the same time windows 98 writes its own data on it ... boom). Same problem if you could use a real partition ... which you can't, unless you want to share an entire disk.

You're better off using Samba or FTP.

Quoted 5 lines

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#3 lore raw
Quoted 21 lines · Jim C. Brown
Quoted 16 lines · Joe Menola
Quoted 8 lines · Mario Cazorzi

I have just installed Windows98 on my Linux machine (Suse 9.1 64bit, sata HD). Qemu works really very, very good.
The only thing I missed is the possibility to exchange data between the two OS. (I mean cut and paste).
Probably at the moment the only possibility is to make a fat32 partition so I can see it from Linux and from Windows too. Is that the only solution (if I can spare so a partition I will be very happy).

Actually you can't mount a partition in Qemu that's not buried inside your .img file. At least no way I found yet.
You can use lomount to mount your .img partitions in Linux, this requires root access tho.
http://www.dad-answers.com/qemu/utilities/QEMU-HD-Mounter/

Quoted 3 lines

Btw, thanks dad for the very useful site. :)

-jm

Quoted 7 lines

This isn't safe though. It might work, but you run the risk of corrupting the partition in question (e.g. Linux updates the spare partition at the same time windows 98 writes its own data on it ... boom). Same problem if you could use a real partition ... which you can't, unless you want to share an entire disk.

You're better off using Samba or FTP.

I agree, I was suggesting using lomount only to move files onto the .img drive. Not running both in tandem. Sorry if I was unclear. And thank you for pointing this out.
As for Samba and FTP,... if I could figure out the whole /dev/tun thing, those would be my first choice. Stuck (for now) with -user-net, leaves lomount as my only option. :(

-jm

#4 lore raw

/dev/tun Was: Re: [Qemu-devel] Win98: how to exchange data with Linux

Quoted 6 lines · Joe Menola

As for Samba and FTP,... if I could figure out the whole /dev/tun thing, those would be my first choice. Stuck (for now) with -user-net, leaves lomount as my only option. :(

-jm

I recommend using VDE (vde.sourceforge.net) as it has its own HOWTO on how to set it up and its easier to maintain.

If you decide to install VDE and need help, I will be willing to answer any question you might have.

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#5 lore raw

Re: /dev/tun Was: Re: [Qemu-devel] Win98: how to exchange data with Linux

Quoted 5 lines · Jim C. Brown

I recommend using VDE (vde.sourceforge.net) as it has its own HOWTO on how to set it up and its easier to maintain.

If you decide to install VDE and need help, I will be willing to answer any question you might have.

<added to todo list>
Thank you very much. I'll most likely be doing all of that. :)

-jm

#6 lore raw

Re: /dev/tun Was: Re: [Qemu-devel] Win98: how to exchange data with Linux

Quoted 7 lines · Joe Menola
Quoted 5 lines · Jim C. Brown

I recommend using VDE (vde.sourceforge.net) as it has its own HOWTO on how to set it up and its easier to maintain.

If you decide to install VDE and need help, I will be willing to answer any question you might have.

I'm baaaaaaaaaack. :)

I started playing with vbe, I think I've made some progress but can't seem to get things working. It's possible that I'm in over my head.... I'll let you be the judge.
Here's where I'm at:

As root:
[root@joe vde-1.5.3]# ./vde_switch -tap tap0 -daemon
[root@joe vde-1.5.3]# ifconfig tap0 192.168.0.254
[root@joe vde-1.5.3]# chmod 777 /tmp/vde.ctl
[root@joe vde-1.5.3]# echo "1" > /proc/sys/net/ipv4/ip_forward [root@joe vde-1.5.3]# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

I assume that at this point vde is set and ready.... or have I already fallen off the edge?

As user I start qemu with

[joe@joe qemu]$ vdeq qemu -hda /mymnt/qemu/qdrive.img -boot c -m 256 -enable-audio -pci -cirrusvga

Monitor output

QEMU 0.5.5 monitor - type 'help' for more information (qemu) qemu exited: vdeq quits
[joe@joe qemu]$

I'm somewhat confused about network settings for Win98, my "real" network consists of my linux host (eth0) connected to a dsl router (192.168.0.1). I tried dchp (my router supports it but it's not installed on my linux host), tried static ip's 192.168.0.254 (address assinged to tap0?) and 192.168.0.135 (unused address on my lan) . As gateway's I have both my routers address and eth0's address on my Linux host. Same for dns.
No internet, and cannot ping anything.

Is there hope? lol

-jm

#7 lore raw

Re: /dev/tun Was: Re: [Qemu-devel] Win98: how to exchange data with Linux

Quoted 14 lines · Joe Menola

I'm baaaaaaaaaack. :)

I started playing with vbe, I think I've made some progress but can't seem to get things working. It's possible that I'm in over my head.... I'll let you be the judge.
Here's where I'm at:

As root:
[root@joe vde-1.5.3]# ./vde_switch -tap tap0 -daemon
[root@joe vde-1.5.3]# ifconfig tap0 192.168.0.254
[root@joe vde-1.5.3]# chmod 777 /tmp/vde.ctl
[root@joe vde-1.5.3]# echo "1" > /proc/sys/net/ipv4/ip_forward [root@joe vde-1.5.3]# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Quoted 3 lines

I assume that at this point vde is set and ready.... or have I already fallen off the edge?

The tap0 device should have its own subnet. E.g. below, it appears that your LAN already uses the 192.168.0.* subnet. I'd recommend that you use this ifconfig instead:

Quoted 1 line

[root@joe vde-1.5.3]# ifconfig tap0 192.168.254.254 netmask 255.255.255.0

I don't know iptables very well, but to the best of my knowledge that looks correct. You can try adding this line as well, not sure if it will help or not however:

Quoted 1 line

[root@joe vde-1.5.3]# iptables -t nat -A POSTROUTING -o tap0 -j MASQUERADE

(note to self: add iptables guru to vde team)

Quoted 11 lines

As user I start qemu with

[joe@joe qemu]$ vdeq qemu -hda /mymnt/qemu/qdrive.img -boot c -m 256 -enable-audio -pci -cirrusvga

Monitor output

QEMU 0.5.5 monitor - type 'help' for more information (qemu) qemu exited: vdeq quits
[joe@joe qemu]$

That looks right, unless you are saying that qemu quits prematurely.

Quoted 9 lines

I'm somewhat confused about network settings for Win98, my "real" network consists of my linux host (eth0) connected to a dsl router (192.168.0.1). I tried dchp (my router supports it but it's not installed on my linux host), tried static ip's 192.168.0.254 (address assinged to tap0?) and 192.168.0.135 (unused address on my lan) . As gateway's I have both my routers address and eth0's address on my Linux host. Same for dns.
No internet, and cannot ping anything.

Is there hope? lol

DHCP from the router will not work. Assuming that you've made the above change and are using the 192.168.254.* subnet, the router/gateway for Win98 is 192.168.254.254 and you can assign it any ip address you want in the subnet, for example 192.168.254.135 should work. You can also do

/sbin/dhcpd tap0

after you set up vde and install a DHCPd server. That works great for me. (I can give you my dhcpd.conf file if you decide to go this route.)

Quoted 10 lines

-jm

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#8 lore raw

Re: /dev/tun Was: Re: [Qemu-devel] Win98: how to exchange data with Linux

Quoted 16 lines · Jim C. Brown
Quoted 15 lines · Joe Menola

I'm baaaaaaaaaack. :)

I started playing with vbe, I think I've made some progress but can't seem to get things working. It's possible that I'm in over my head.... I'll let you be the judge.
Here's where I'm at:

As root:
[root@joe vde-1.5.3]# ./vde_switch -tap tap0 -daemon [root@joe vde-1.5.3]# ifconfig tap0 192.168.0.254 [root@joe vde-1.5.3]# chmod 777 /tmp/vde.ctl
[root@joe vde-1.5.3]# echo "1" > /proc/sys/net/ipv4/ip_forward [root@joe vde-1.5.3]# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Quoted 9 lines
Quoted 2 lines

I assume that at this point vde is set and ready.... or have I already fallen off the edge?

The tap0 device should have its own subnet. E.g. below, it appears that your LAN already uses the 192.168.0.* subnet. I'd recommend that you use this

ifconfig instead:

Quoted 1 line

[root@joe vde-1.5.3]# ifconfig tap0 192.168.254.254 netmask 255.255.255.0

Done

Quoted 7 lines

I don't know iptables very well, but to the best of my knowledge that looks correct. You can try adding this line as well, not sure if it will help or

not however:

Quoted 2 lines

[root@joe vde-1.5.3]# iptables -t nat -A POSTROUTING -o tap0 -j MASQUERADE

Tried both tap0 and eth0, also each seperately, no difference seen.

Quoted 8 lines

(note to self: add iptables guru to vde team)

Quoted 5 lines

As user I start qemu with

[joe@joe qemu]$ vdeq qemu -hda /mymnt/qemu/qdrive.img -boot c -m 256 -enable-audio -pci -cirrusvga

Quoted 7 lines
Quoted 5 lines

Monitor output

QEMU 0.5.5 monitor - type 'help' for more information (qemu) qemu exited: vdeq quits
[joe@joe qemu]$

That looks right, unless you are saying that qemu quits prematurely.

No, that was output from a completed and closed Qemu session.

Quoted 15 lines
Quoted 9 lines

I'm somewhat confused about network settings for Win98, my "real" network consists of my linux host (eth0) connected to a dsl router (192.168.0.1). I tried dchp (my router supports it but it's not installed on my linux host), tried static ip's 192.168.0.254 (address assinged to tap0?) and 192.168.0.135 (unused address on my lan) . As gateway's I have both my routers address and eth0's address on my Linux host. Same for dns. No internet, and cannot ping anything.

Is there hope? lol

DHCP from the router will not work. Assuming that you've made the above change and are using the 192.168.254.* subnet, the router/gateway for Win98 is 192.168.254.254 and you can assign it any ip address you want in the subnet, for example 192.168.254.135 should work. You can also do

Quoted 4 lines

/sbin/dhcpd tap0

after you set up vde and install a DHCPd server. That works great for me. (I can give you my dhcpd.conf file if you decide to go this route.)

Please do. I've installed a DHCPd server, I doubt that I have dhcpd.conf setup properly.

Thanks again for all your help. I've been keeping a log of my efforts, if I get this up and going I could easily put together a cut n paste trail of all my steps. You might be able to use it as a rough draft for your up coming "VBE For Dumbies" book?

-jm

#9 lore raw

Re: /dev/tun Was: Re: [Qemu-devel] Win98: how to exchange data with Linux

Quoted 5 lines · Joe Menola
Quoted 5 lines

DHCP from the router will not work. Assuming that you've made the above change and are using the 192.168.254.* subnet, the router/gateway for Win98 is 192.168.254.254 and you can assign it any ip address you want in the subnet, for example 192.168.254.135 should work. You can also do

Quoted 8 lines
Quoted 4 lines

/sbin/dhcpd tap0

after you set up vde and install a DHCPd server. That works great for me. (I can give you my dhcpd.conf file if you decide to go this route.)

Please do. I've installed a DHCPd server, I doubt that I have dhcpd.conf setup properly.

I attach a modified version here. I've changed the IPs to reflect your subnet (mine is 192.168.1.*) and I've deleted the section I had that gave out fixed ip addresses to certain mac addresses.

You'll have to edit the domain name options and the netbios name server option yourself.

If this one gives a syntax error I'll send my original, unmodified dhcpd.conf file.

Quoted 12 lines

Thanks again for all your help. I've been keeping a log of my efforts, if I get this up and going I could easily put together a cut n paste trail of all my steps. You might be able to use it as a rough draft for your up coming "VBE For Dumbies" book?

-jm

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.

default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.254.255;
option routers 192.168.254.254;
option domain-name-servers 192.168.0.1;
option domain-name "mylinuxbox.org";
option netbios-name-servers 192.168.0.1;

subnet 192.168.254.0 netmask 255.255.255.0 {
	range 192.168.254.10 192.168.254.20;
}
#10 lore raw

Re: /dev/tun Was: Re: [Qemu-devel] Win98: how to exchange data with Linux

Quoted 18 lines · Jim C. Brown
Quoted 5 lines · Joe Menola
Quoted 5 lines

DHCP from the router will not work. Assuming that you've made the above change and are using the 192.168.254.* subnet, the router/gateway for Win98 is 192.168.254.254 and you can assign it any ip address you want in the subnet, for example 192.168.254.135 should work. You can also do

Quoted 7 lines
Quoted 4 lines

/sbin/dhcpd tap0

after you set up vde and install a DHCPd server. That works great for me. (I can give you my dhcpd.conf file if you decide to go this route.)

Please do. I've installed a DHCPd server, I doubt that I have dhcpd.conf setup properly.

I attach a modified version here. I've changed the IPs to reflect your subnet (mine is 192.168.1.*) and I've deleted the section I had that gave out fixed ip addresses to certain mac addresses.

Quoted 5 lines

You'll have to edit the domain name options and the netbios name server option yourself.

If this one gives a syntax error I'll send my original, unmodified dhcpd.conf file.

Your dhcpd.conf file worked fine. Thank you.

I still wasn't able to get vbe to work. Everything looked in order, but no connection. I may have messed up the install of vbe.

Anyway, I decided to try and configure tun0 direct. After *much* ado I've finally got my connection (almost). I would have never pulled it off with the knowledge gained from you.

My Qemu network now connects to network shares, and I have a working internet connection under Linux guests.
For some reason, I cannot get internet on Win98. Network shares works fine but no net. Even switching to -user-net doesn't help, so it's probably a Windows problem.

Only thing left to try is reinstall Windows and see if that helps.

Just wanted to update, and throw a final thanks at ya. :)

-jm

#11 lore raw
In reply to Mario Cazorzi

Use the virtual network.

The usual solution in emualtors to transferring data between Windows Guest and Linux is to use Windows File Sharing (SMB). Share out a drive from your 98 machine and mount it on Linux using Samba.

Also you can use simpler things like HTTP. FTP.

-- John.

#12 lore raw
Quoted 6 lines · John R. Hogerhuis

Use the virtual network.

The usual solution in emualtors to transferring data between Windows Guest and Linux is to use Windows File Sharing (SMB). Share out a drive from your 98 machine and mount it on Linux using Samba.

Or safer solution, use Samba not as a client, but as a server. In windows do a right click on "My Computer", then "map drive".
But I agree that if you have never set up Samba before, John's solution is much simplier.

#13 lore raw

Better idea is to write ntfs or vfat driver for windows witch can use qemu backdoor IO port to have directly windows filesystem on linux filesystem.

Bye.

Signature · 2 lines
Sebastien Bechet <[email protected]>
av7.net
#14 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sebastien Bechet wrote:

| Better idea is to write ntfs or vfat driver for windows witch can use
| qemu backdoor IO port to have directly windows filesystem on linux
| filesystem.

load it from the floppy and install windows directly into a directory on linux side :)))) without img or cow image :)))) yeah!!! :)))

- --
Pozdrowienia
Adrian Smarzewski
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA8+8fgnuWEmthbpURAkquAJ9DO0reBpxo2jbV9EkY3qUH73/JlACgkkIT VC/mxaAJ12NIk3XcyJR0jUY=
=5j50
-----END PGP SIGNATURE-----

#15 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Adrian Smarzewski wrote:
| load it from the floppy and install windows directly into a directory | on linux side :)))) without img or cow image :)))) yeah!!! :)))

I was too optimistic, windows could not boot from unsupported file systems, but look here:

http://sourceforge.net/projects/winext2fsd

It's a windows nt driver for ext2 partitions. maybe we could change it so instead of writting files on real drive it will pass commands to qemu? file system is not so important, but this driver is lgpl'ed.

- --
Pozdrowienia
Adrian Smarzewski
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA8/WwgnuWEmthbpURAnXvAJsGgMnYr/PGd505E8VhIly3Yf30ewCfdBUI QZtO/C8vJvytR25VA5NQX+E=
=UsUY
-----END PGP SIGNATURE-----

#16 lore raw

Adrian Smarzewski wrote:
[snip]

Quoted 4 lines

It's a windows nt driver for ext2 partitions. maybe we could change it so instead of writting files on real drive it will pass commands to qemu? file system is not so important, but this driver is lgpl'ed.

At first guys, you confuse file system drivers and storage drivers. The file system drivers have de facto no knowledge on which disk are the data located, (on Windows) they recieve an object and send Read/Write requests to it (well, basicly, in reality there's also the cache manager between them). At second, the idea can't work, even if you would have a storage driver that uses some backdoor I/O port to access host disk, the host OS can't access the same partition at the same time due to things like caching (on both sides (guest/host)).

- Filip

#17 lore raw
Quoted 8 lines · Filip Navara

Adrian Smarzewski wrote:
[snip]

Quoted 4 lines

It's a windows nt driver for ext2 partitions. maybe we could change it so instead of writting files on real drive it will pass commands to qemu? file system is not so important, but this driver is lgpl'ed.

Quoted 9 lines

At first guys, you confuse file system drivers and storage drivers. The file system drivers have de facto no knowledge on which disk are the data located, (on Windows) they recieve an object and send Read/Write requests to it (well, basicly, in reality there's also the cache manager between them). At second, the idea can't work, even if you would have a storage driver that uses some backdoor I/O port to access host disk, the host OS can't access the same partition at the same time due to things like caching (on both sides (guest/host)).

Yes, it is a non-workable idea to try to share a filesystem between two running OSes.

On a slightly different tack, if your guest OS image was no longer bootable for some reason it would be nice to be able to mount the file system within that image for the purpose of data recovery.

Is there a way to do that?

-- John.

#18 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John R. Hogerhuis wrote:
| Yes, it is a non-workable idea to try to share a filesystem between two | running OSes.

I don't agree because samba for example is the application that does it.

- - change samba serwer to little server builded-in into qemu
- - change smb windows client to filesystem driver communicating with our server
- - change tcp protocol to hidden ioports communication between windows driver and qemu little-server (like vmware-tools communication protocol)

and it will be the thing that I'm talking about.

- --
Pozdrowienia
Adrian Smarzewski
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA9CK7gnuWEmthbpURAgSNAJ4g31sbNV4BLAQWNtABTvD1+tPOdwCdFsYQ oEu0hgylEraYe7U5M7GO9dk=
=GDW5
-----END PGP SIGNATURE-----

#19 lore raw
Quoted 7 lines · Adrian Smarzewski

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John R. Hogerhuis wrote:
| Yes, it is a non-workable idea to try to share a filesystem between two | running OSes.

Quoted 5 lines

I don't agree because samba for example is the application that does it.

- - change samba serwer to little server builded-in into qemu
- - change smb windows client to filesystem driver communicating with our server

Ah. Could I phrase it as: you wish to share the drive through Windows networking but you want to share it through QEMU communicating through I/O ports to the loopback device only.

I guess then there is no need to set up real networking between guest and host just to share files.

That is in the realm of the possible. Wouldn't it be easier though just to set up the virtual network?

-- John.

#20 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John R. Hogerhuis wrote:

| Ah. Could I phrase it as: you wish to share the drive through Windows
| networking but you want to share it through QEMU communicating through
| I/O ports to the loopback device only.

rather using special driver than windows networking. just like zip drive for example or drive created by "subst" command.

| I guess then there is no need to set up real networking between guest | and host just to share files.
yes.

| That is in the realm of the possible. Wouldn't it be easier though just | to set up the virtual network?
1) virtual network is still not working for me :/
2) do we really need all samba installation and configuration, windows networking, users, passwords, just to share some files?
3) maybe we can find a way to boot guest os from this emulated drive without .img files? resizing it is not very comfortable and reiserfs is better than fat/ntfs.

- --
Pozdrowienia
Adrian Smarzewski
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA9CqdgnuWEmthbpURAs4vAJ9+1Yw+ZsMDgQw8WBGF6M+P9COXjgCeMJBI RlTRyKjjfRbOC/lXswRfE1Q=
=Pdro
-----END PGP SIGNATURE-----

#21 lore raw
Quoted 10 lines · Adrian Smarzewski

1) virtual network is still not working for me :/
2) do we really need all samba installation and configuration, windows networking, users, passwords, just to share some files?
3) maybe we can find a way to boot guest os from this emulated drive without .img files? resizing it is not very comfortable and reiserfs is better than fat/ntfs.

- --
Pozdrowienia
Adrian Smarzewski

1) and 2) are satified with a built-in qemu ftp server.

3) does need a hack (even a builtin SMB/CIFS server wouldn't work as we'd need to emulate a physical disk). This is extremely tricky tho.

As for resizing disk images, that could be solved if we had our own version of mkfile (the DOSMinix disk image maker, which can resize disk images as well as create them, without any data loss (ok if you shrink an image you lose the data at the end of it, but otherwise there is no data loss)). I think mkfile is open-source so it should be easy to port to qemu. I should also point out that mkfile seems to work on raw disk images.

Quoted 14 lines

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA9CqdgnuWEmthbpURAs4vAJ9+1Yw+ZsMDgQw8WBGF6M+P9COXjgCeMJBI RlTRyKjjfRbOC/lXswRfE1Q=
=Pdro
-----END PGP SIGNATURE-----

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#22 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim C. Brown wrote:
| 1) and 2) are satified with a built-in qemu ftp server. are there any windows ftp-clients mounting ftp resources as a windows drive (read/write)?

- --
Pozdrowienia
Adrian Smarzewski
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA9QHognuWEmthbpURAprnAKClq6XxAmbThuiijtbJaUwi4AO+kgCeNQX3 XzrXvY5UpJPfJPNM0a6Ysb4=
=F/yA
-----END PGP SIGNATURE-----

#23 lore raw
Quoted 7 lines · Adrian Smarzewski

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim C. Brown wrote:
| 1) and 2) are satified with a built-in qemu ftp server. are there any windows ftp-clients mounting ftp resources as a windows drive (read/write)?

How about using Microsoft's free Services for Unix download... It has the GNU tools, a NFS client, NFS server and more.

http://www.microsoft.com/windows/sfu/downloads/default.asp

You may need to create a HotMail/MSPassport account in order to download it - it is quite large, about 250MB and includes sources for GNU parts.

Funny that Microsoft is distributing GNU binaries and source... and on the other hand, they say that GNU is evil....

Signature · 1 line
Antony T Curtis <[email protected]>
#24 lore raw
In reply to Adrian Smarzewski
Quoted 7 lines · Adrian Smarzewski

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim C. Brown wrote:
| 1) and 2) are satified with a built-in qemu ftp server. are there any windows ftp-clients mounting ftp resources as a windows drive (read/write)?

Here are the solutions I see (in order of increasing complexity):

1) built-in FTP server in the SLIRP layer.

2) On the fly read-only FAT drive built from a host directory content. It is complementary to (1) to enable booting without a disk image ((2) is used with (3) in dosemu for example).

3) dosemu MSDOS redirector. Would only work with MSDOS based OSes (maybe up to Windows Me).

4) Integrated SMB server in the SLIRP layer. SMB is complicated because it has many variants. If an early version works with all Windows version it can be interesting.

5) Windows specific filesystem driver talking directly with QEMU.

Fabrice.

#25 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fabrice Bellard wrote:

| Adrian Smarzewski wrote:
|> are there any windows ftp-clients mounting ftp resources as
|> a windows drive (read/write)?

I've found this one:
http://www.knoware.com/index.php?pg=./products/inpro/index
but It's not free :/

| 1) built-in FTP server in the SLIRP layer.
FTP is simpler that SMB and every OS has FTP client I think. I will vote for this if I find free replacement for above ftp client with drive mapping feature ;)

| 2) On the fly read-only FAT drive built from a host directory content. | It is complementary to (1) to enable booting without a disk image This two will be perfect for me. . And FAT structure is also not very complicated to build. But can you boot windows 2000 for example using read-only drive?

- --
Pozdrowienia
Adrian Smarzewski
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA9R/qgnuWEmthbpURAvPgAKCjuGKtuGTE69qvw7kPJC3/r4rraQCgrarf XapEBi1p44ChQgodqMsBU14=
=tYBq
-----END PGP SIGNATURE-----

#26 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Adrian Smarzewski wrote:

| Fabrice Bellard wrote:
| | Adrian Smarzewski wrote:
| |> are there any windows ftp-clients mounting ftp resources as
| |> a windows drive (read/write)?
| I've found this one:
| http://www.knoware.com/index.php?pg=./products/inpro/index
| but It's not free :/

And www.webdrive.com but we will need free alternative to win with smb.

- --
Pozdrowienia
Adrian Smarzewski
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA9TzVgnuWEmthbpURApaLAKCloIUngMq+DDxrlPje6+64B/0RYwCgjla6 hp75pDYMNVEDl5cTxC3hmak=
=gqoa
-----END PGP SIGNATURE-----

#27 lore raw
In reply to Fabrice Bellard

Hi Fabrice,

I like option 1 since it is less "DOS centric," and more generic solution.

Kind Regards,

Brad Watson

Quoted 35 lines · --- Fabrice Bellard
Quoted 5 lines · Adrian Smarzewski

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim C. Brown wrote:
| 1) and 2) are satified with a built-in qemu ftp

server.

Quoted 1 line

are there any windows ftp-clients mounting ftp

resources as

Quoted 1 line

a windows drive (read/write)?

Here are the solutions I see (in order of increasing complexity):

1) built-in FTP server in the SLIRP layer.

2) On the fly read-only FAT drive built from a host directory content.
It is complementary to (1) to enable booting without a disk image ((2)
is used with (3) in dosemu for example).

3) dosemu MSDOS redirector. Would only work with
MSDOS based OSes (maybe
up to Windows Me).

4) Integrated SMB server in the SLIRP layer. SMB is complicated because
it has many variants. If an early version works with all Windows version
it can be interesting.

5) Windows specific filesystem driver talking
directly with QEMU.

Quoted 9 lines

Fabrice.

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo

#28 lore raw

Brad Watson wrote:

| I like option 1 since it is less "DOS centric," and
| more generic solution.
|
| --- Fabrice Bellard <[email protected]> wrote:
|

Please do not use top-posting and cut quotes.

Signature · 2 lines
Pozdrowienia
Adrian Smarzewski
#29 lore raw
In reply to Fabrice Bellard
Quoted 1 line · Fabrice Bellard

1) built-in FTP server in the SLIRP layer.

HTTP was intended at least in part to replace FTP. It might make more sense as a file transfer protocol. Maybe integrate a simple web server into SLIRP layer instead of FTP?

Of course you would need some basic security like default the service to being OFF, and once enabled defaulted to allowing connections from localhost only.

Makes you wonder what else would be interesting besides some of the file system one could expose through a default web page by QEMU. Things like:
whether in BIOS code, cpu utilization, a recent snapshot of the screen, some basic things about processor mode, amount of RAM in use, perhaps some control buttons like RESET, SUSPEND, PAUSE, partitions and %full, etc.

-- John.

#30 lore raw
Quoted 7 lines · John R. Hogerhuis
Quoted 1 line · Fabrice Bellard

1) built-in FTP server in the SLIRP layer.

HTTP was intended at least in part to replace FTP. It might make more sense as a file transfer protocol. Maybe integrate a simple web server into SLIRP layer instead of FTP?

I also like the idea of a web server instead of an FTP server. A basic web server would be quite a bit easier to write than an FTP server, and it could later be extended with a basic WebDAV implementation to support more filesystem-like read-write access.

The downside is that WebDAV is possibly more complex to implement than FTP, and a HTTP server without WebDAV is only really a partial solution, since there's no really easy way to do guest->host transfers.

Thanks
Leigh

#31 lore raw
Quoted 9 lines · Leigh Dyer

I also like the idea of a web server instead of an FTP server. A basic web server would be quite a bit easier to write than an FTP server, and it could later be extended with a basic WebDAV implementation to support more filesystem-like read-write access.

The downside is that WebDAV is possibly more complex to implement than FTP, and a HTTP server without WebDAV is only really a partial solution, since there's no really easy way to do guest->host transfers.

I don't know what WebDAV is but if you implement http GET and PUT you have a full solution to transferring files, just no security. OP just wanted a way to do easy clipboard between the two, no security there either.

But usual FTP doesn't give you real security anyway, so no big difference really.

Security can be added in the form of cgi scripts, authentication, even encryption (HTTPS or SSL) later on. Just need to pick the right web server to embed, and figure out the business end of it that integrates with SMB (would have to utilize samba...).

And actually I don't think we would need to write yet another web server. There are several on Freshmeat, including lightweight ones, for the picking.

Seems kind of exciting prospect actually. Imagine you have some legacy part of a business process running under windows. With an easy file sharing scheme like this, Windows+app becomes a black box with enough inputs/outputs and levers (some HTTP POST commands) to run essentially headless.

Later,

-- John.

#32 lore raw
Quoted 12 lines · John R. Hogerhuis
Quoted 9 lines · Leigh Dyer

I also like the idea of a web server instead of an FTP server. A basic web server would be quite a bit easier to write than an FTP server, and it could later be extended with a basic WebDAV implementation to support more filesystem-like read-write access.

The downside is that WebDAV is possibly more complex to implement than FTP, and a HTTP server without WebDAV is only really a partial solution, since there's no really easy way to do guest->host transfers.

Quoted 4 lines

I don't know what WebDAV is but if you implement http GET and PUT you have a full solution to transferring files, just no security. OP just wanted a way to do easy clipboard between the two, no security there either.

WebDAV's an extension of HTTP that allows for FTP-style directory level access. IE does WebDAV quite nicely (it calls the idea "Web Folders"), so you can open an IE window to browse your WebDAV folders that looks and acts pretty much like a standard Explorer window. I think it could be a good alternative to trying to implement something far more complex like SMB.

WebDAV is implemented by adding extra HTTP methods on top of the usual T/POST, so it would easily be possible to throw a basic web server in to QEMU now and flesh it out with WebDAV support later.

Thanks
Leigh

#33 lore raw
In reply to Adrian Smarzewski
Quoted 15 lines · Adrian Smarzewski

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John R. Hogerhuis wrote:
| Yes, it is a non-workable idea to try to share a filesystem between two | running OSes.

I don't agree because samba for example is the application that does it.

- - change samba serwer to little server builded-in into qemu
- - change smb windows client to filesystem driver communicating with our server
- - change tcp protocol to hidden ioports communication between windows driver and qemu little-server (like vmware-tools communication protocol)

Quoted 5 lines

and it will be the thing that I'm talking about.

- --
Pozdrowienia
Adrian Smarzewski

You don't need the second step,

Quoted 2 lines

- - change smb windows client to filesystem driver communicating with our server

but the rest is workable. VMware actually does this, iirc. It would be easier to support NFS as the special protocol and use an open-source NFS client for Windows tho.
Then again, do we really need full filesystem access? It would be simpler for qemu to emulate an ftp server on the guest side (use "-ftp" option to turn the server on, and "-ftpdir <dir>" to tell qemu where it should serve from).

Quoted 14 lines

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA9CK7gnuWEmthbpURAgSNAJ4g31sbNV4BLAQWNtABTvD1+tPOdwCdFsYQ oEu0hgylEraYe7U5M7GO9dk=
=GDW5
-----END PGP SIGNATURE-----

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#34 lore raw
In reply to John R. Hogerhuis
Quoted 9 lines · John R. Hogerhuis

On a slightly different tack, if your guest OS image was no longer bootable for some reason it would be nice to be able to mount the file system within that image for the purpose of data recovery.

Is there a way to do that?

-- John.

FreeBSD has the ability to read the partition table from a raw disk image and mount the partition on it natively (or so I'm told at least). Not sure about the other BSDs.

Under Linux you can use lomount.

Quoted 6 lines

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#35 lore raw

Hi,

I haven't followed this track completely, but one option that might not be too difficult to implement would be to use emufs.sys or lredir.exe from xdosemu. I'm not sure whether they are limited to plain old dos or whether they'll work in windows 9x/me as well.

Just a thought
Johannes

P.S.: personally, I think sharing via smb or some other protocol is the
better option as it doesn't require any special guest code.

#36 lore raw
In reply to Filip Navara

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Filip Navara wrote:

| At first guys, you confuse file system drivers and storage drivers. The
| file system drivers have de facto no knowledge on which disk are the
| data located, (on Windows) they recieve an object and send Read/Write

I don't know how exactly filesystems works in windows but I'm talking about someting like "subst" command. But instead of redirecting file access routines to real windows file system driver (with new, substituted patch) it will redirect it to qemu and linux filesystem. The real write access will be made by linux kernel (via glibc).

- --
Pozdrowienia
Adrian Smarzewski
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA9CDJgnuWEmthbpURAhH4AKCWNuD9dJqOFf249Z5hmR5LD3gvlACfdNuM xPet2Ye/xeHOaYBiO7zsvUg=
=6UKm
-----END PGP SIGNATURE-----

#37 lore raw
In reply to Filip Navara
Quoted 5 lines · Filip Navara

At first guys, you confuse file system drivers and storage drivers. The file system drivers have de facto no knowledge on which disk are the data located, (on Windows) they recieve an object and send Read/Write requests to it (well, basicly, in reality there's also the cache manager between them).

So on windows :

(A = Application) <-> (B = receive an object and send r/w) <-> (C = cachemgr) <-> (B = ntfs.sys or vfat or ...)

What is B ? DLL Name, SYS Name ? Registry ? API Size ? Why not to rewrite B in guest to access IOCTL Host OS using Backdoor qemu IO port ? Maybe Wine LGPL work is usable to do that ?

With this method we can have windows files directly on linux filesystem and we can share it directly ! In my opinion this idea _can_ work and is a killer feature but only for Windows GURU (meditation ;p) ...

Quoted 4 lines

At second, the idea can't work, even if you would have a storage driver that uses some backdoor I/O port to access host disk, the host OS can't access the same partition at the same time due to things like caching (on both sides (guest/host)).

Not host disk access, filesystem linux kernel IOCTL access.

Bye.

Signature · 2 lines
Sebastien Bechet <[email protected]>
av7.net
#38 lore raw
In reply to Filip Navara
Quoted 17 lines · Filip Navara

Adrian Smarzewski wrote:
[snip]

Quoted 4 lines

It's a windows nt driver for ext2 partitions. maybe we could change it so instead of writting files on real drive it will pass commands to qemu? file system is not so important, but this driver is lgpl'ed.

At first guys, you confuse file system drivers and storage drivers. The file system drivers have de facto no knowledge on which disk are the data located, (on Windows) they recieve an object and send Read/Write requests to it (well, basicly, in reality there's also the cache manager between them). At second, the idea can't work, even if you would have a storage driver that uses some backdoor I/O port to access host disk, the host OS can't access the same partition at the same time due to things like caching (on both sides (guest/host)).

Quoted 3 lines

- Filip

Technically speaking, one could write a file system driver that talks to qemu instead of going through a storage driver. (I didn't say it would be easy, just barely possible.) Qemu could then translate attempts (to write a file on Windows using this driver would cause qemu to write the file on linux's fs natively for example). It is more work than its worth, but it is possible.

A modified user-net which emulated SMB protocol to the guest but did the i/o natively on the host would do the same thing and be easier to implement.

Setting up tuntap or VDE is easiest of all. :)

Quoted 4 lines

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#39 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim C. Brown wrote:
| Setting up tuntap
didn't work and I'm not a newbie :( maybe gentoo patched kernel is the problem. I will try again soon.

- --
Pozdrowienia
Adrian Smarzewski
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA9QLwgnuWEmthbpURAp1AAJ4jkoQPgXyH//+9qpbGoOksIrMMBQCdGTOG 7R+8F3D+3SNwejaaZgJ02DY=
=utLw
-----END PGP SIGNATURE-----

#40 lore raw
In reply to Jim C. Brown

Jim C. Brown wrote:
| Setting up tuntap
didn't work and I'm not a linux newbie :(
maybe gentoo patched kernel is the problem.
I will try again soon.

Signature · 2 lines
Pozdrowienia
Adrian Smarzewski
#41 lore raw
Quoted 4 lines · Adrian Smarzewski

Jim C. Brown wrote:
| Setting up tuntap
didn't work and I'm not a linux newbie :(
maybe gentoo patched kernel is the problem.

I guess not:
tun/tap is functional on Gentoo with kernel 2.6 and qemu is able to use it (x86 and x86_64).
Don't know with 2.4 kernels, but it should also work fine.

Signature · 2 lines
J. Mayer <[email protected]>
Never organized
#42 lore raw
In reply to Jim C. Brown
Quoted 7 lines · Jim C. Brown

Technically speaking, one could write a file system driver that talks to qemu instead of going through a storage driver. (I didn't say it would be easy, just barely possible.) Qemu could then translate attempts (to write a file on Windows using this driver would cause qemu to write the file on linux's fs natively for example). It is more work than its worth, but it is possible.

Strictly technically you would need to fake a storage device (~ 1000 lines code) since Windows can't mount filesystem without a device and then you can write a file system driver that will recoginze the fake device and act as you described. I agree, yes, doing this is possible, but it would be pretty complex to implement for no real gain. It's less flexible than any solution based on networking (since you would have to write a guest driver for every OS that you want to use the feature in) and the speed increase would be marginal if any.

Quoted 4 lines

A modified user-net which emulated SMB protocol to the guest but did the i/o natively on the host would do the same thing and be easier to implement.

Again, I agree, that's the way to go.

Regards,
Filip

#43 lore raw
In reply to Sebastien Bechet
Quoted 11 lines · Sebastien Bechet

Better idea is to write ntfs or vfat driver for windows witch can use qemu backdoor IO port to have directly windows filesystem on linux filesystem.

Bye.

Signature · 2 lines
Sebastien Bechet <[email protected]>
av7.net

That would be quite a bit of work, both on the qemu side and for the guest OS.

It is possible (to e.g. have a hacked vfat driver that instead of passing requests to the disk manager pass these requests directly to qemu and have qemu translate it into native linux file accesses) but even if done well, its a major hack.

Quoted 5 lines

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#44 lore raw
In reply to Mario Cazorzi
Quoted 7 lines · Mario Cazorzi

I have just installed Windows98 on my Linux machine (Suse 9.1 64bit, sata HD).
Qemu works really very, very good.
The only thing I missed is the possibility to exchange data between the two OS. (I mean cut and paste). Probably at the moment the only possibility is to make a fat32 partition so I can see it from Linux and from Windows too. Is that the only solution (if I can spare so a partition I will be very happy).

mcz

Maybe something like http://synergy2.sourceforge.net/ could be used for cut and paste - just need to adapt it for one screen embedded in the other rather than side by side....

rob