[clue-tech] Virtual machine networking problem with samba

Jim Ockers ockers at ockers.net
Mon Nov 30 09:10:25 MST 2009


Michael,

Instead of the name "babbage" could you try connecting to the samba 
server's IP address?  This will tell you if the problem is basic network 
connectivity or just a browsing/name resolution problem.

That is, type "net use \\172.16.1.x\sharename" instead of "net use 
\\babbage\sharename" .

If that works, then you can try adding babbage to 
%systemroot%\system32\drivers\etc\hosts file or else fix your nmbd 
(netbios name daemon, part of samba) problem, probably by fixing the 
samba configuration file or else some firewall rule that should be 
allowing nmbd broadcast traffic but isn't.

Hope this helps,
Jim

Michael Irons wrote:
> Hello all,
>
>
> I have a host laptop which acts as a host to virtual machines and a 
> samba server. The main purpose of setting up the samba server was to 
> transfer files from the XP vm guest to the host which is my main 
> workstation. The problem is that the XP guest can only find the samba 
> server intermittently. Don't hesitate to correct my networking 
> skills... It is definitely my weak point in all of this.
>
>
> I know the samba server is set up correctly on my laptop "Babbage", as 
> other machines can connect to the samba server just fine. My virtual 
> machine network works flawlessly as I can ping everything from 
> everywhere. I think my problem lies in my guest VM's local network 
> name resolution. My guests don't know where host Babbage is located. 
> The odd part is that I can intermittently connect to the samba server 
> from the guest xp vm by mapping a network drive. when it works, it 
> works fine. when it does not work, I get this message:
>
> "The network path to Babbage\share could not be found."
>
>
> I have tried adding Babbage's ip address to the XP vm's host file for 
> a quick fix, but to no avail.
>
> Can anyone steer me in the right direction? I am googled out.
>
>
> I have a non standard VM setup. I need more then the standard 
> userspace ubuntu setup provides (I have to reach the VMs from the 
> outside), and my wireless card does not support bridging, so a bridge 
> was not a option. I often require my vm's to have network connectivity 
> without a wired connection.
>
> I have scripts that normally execute this setup... I just pulled out 
> the relevant parts to simplify it for the problem at hand:
>
>
> Create a tap0:
>
> sudo tunctl -t tap0
>
> Create a vde switch
>
> sudo vde_switch -d --numports 4 --hub --mod 666 --group users --tap tap0
>
> Configure tap
>
> sudo ifconfig tap0 172.16.1.1 netmask 255.255.255.0
>
> Configure masquerading to allow internet access to vm.
>
> sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
>
> sudo iptables -A FORWARD -i tap0 -j ACCEPT
>
> sudo iptables -A INPUT -s 172.16.1.1 -d 127.0.0.1 -j ACCEPT (not sure 
> I need, just added for assurance when samba wasn't working)
>
> sudo iptables -A OUTPUT -s 127.0.0.1 -d 172.16.1.1 -j ACCEPT (not sure 
> I need, just added for assurance when samba wasn't working)
>
> Start vm ($MAC is a random mac address generated by a script).
>
> vdeq kvm -vga std -usb -hda /vms/xp.img -net nic,macaddr=$MAC -net vde 
> -m 2048
>
> Setting the XP pro guest settings:
>
> Static IP: 172.16.1.2
>
> Default gateway: 172.16.1.1 (same as tap0)
>
> DNS Servers: OpenDNS servers
>
> All of this works. From the VM I can: Ping the host, the tap, the 
> internet, connect to the internet. From the host, I can ping the 
> guest, the tap, and all other normal functions work. Samba is my only 
> problem
>
>
>
> Thanks,
>
>
> Michael Irons
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> clue-tech mailing list
> clue-tech at cluedenver.org
> http://www.cluedenver.org/mailman/listinfo/clue-tech

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue-tech/attachments/20091130/5080393d/attachment.html


More information about the clue-tech mailing list