On Wed, 2005-10-12 at 20:44 +1300, Robert Fisher wrote:
> I have successfully installed Win98 in qemu but I have not yet got the
> sharing 
> sorted out (this could be a show stopper).

By "sharing" I assume you mean "sharing via the windows method" aka
"smb".

I just booted a linux rescue disk with samba on it in qemu, I don't have
tun/tap going on my host machine so qemu is using usermode networking

(http://fabrice.bellard.free.fr/qemu/qemu-doc.html#SEC21)

In this mode my qemu box has the address 10.0.2.15, and I can cruise the
intarnet and all other expected network functions, except ping doesn't
work. This is explained in the above link. My lan is on 192.168.1.x,
which you will notice is a different subnet to the qemu VM. I can web
brose on my lan and the big wide world.

I can also mount smb directories on my lan, like:

mount -t smbfs //media/nick /mnt/cdrom/ -o \
username=nick,ip=192.168.1.11

//media/nick is a smb share on a linux box, /mnt/cdrom is a handy place
to mount it, the rest is self explanatory.

It will also mount a share on a win2k machine on the lan in the same
way. same command line, different share names and ip address, works
fine. I can't imagine the result will be any different if I install w98
on there and mount by ip address in the address bar.

Now what you won't be able to do out of the box in this setup is browse
the smb network that exists on 192.168.1.x. Thats because smb finds
other machines by broadcasting to the subnet they live on. Broadcasting
won't cross subnets, so 10.0.2.15 is never, by default, going to find a
machine on 192.168.1.x by browsing for it. This is because both name
resolution and browsing use broadcasting. Thats why I had to specify the
IP address of //media in the command above. Mounting will work though,
if given the IP address, as demonstrated above.

If you want to get the qemu box to browse and name resolve on the host's
subnet using smb, as I see it you have two choices:

1. Get qemu on the same subnet as the rest of the lan. I have seen an
explanation of this on the forum I pointed to earlier today,
specifically here:

http://m2.dad-answers.com/qemu-forum/viewtopic.php?t=144

2. Set up samba on the host computer to act as a wins server and a
domain master browser. I haven't set this up for yonks, so I would have
to brush up. There used to be a good howto I pointed people at but it
has fallen off the net. Essentially what these settings do is allow smb
name resolution and browsing cross subnet boundaries. If you set the
wins server address in the settings of your virtual machine (linux/samba
or windows) then it should be able to browse and resolve names on the
hosts subnet.



Reply via email to