How to make Windows 7 Network show Samba share after VM is rebooted/restored?

2

On Windows 7, I have VirtualBox running Linux (Ubuntu 8.04), with Samba set up so that the Windows host can access it. But if the virtual machine is shut down & restored, or rebooted, the Windows Network no longer shows it.

I've tried refreshing many times, restarting Samba, disabling/enabling the virtual network adapter, and running the succession of commands ipconfig /release, ipconfig /flushdns, & ipconfig /renew, but none worked. As a last resort I could restart the host itself, but is there a better way?

user36331

Posted 2010-01-18T20:52:35.943

Reputation:

It does not show in the browser or? Can you access the Samba share directly like \IP.or.hostname? – xeon – 2010-01-18T20:54:20.480

Answers

1

Windows networking uses NetBios for computer name resolution on file sharing. This is configured through the nbtstat command line program not ipconfig. Try running nbtstat -R to purge and reload the name cache. You should then be able to find the machine again or right click on the Computer icon to re-map the network drive manually.

Also is virtualbox using a Bridged network adapter or NAT? When trying to access VMs over the network it is usually easier to setup a bridged network adapter so long as there is a DHCP server available to assign IP addresses. Most cable modems use NAT and DHCP already so they will give private addresses to all of your virtual machines.

Greg Bray

Posted 2010-01-18T20:52:35.943

Reputation: 1 772

0

Try using another NIC in VirtualBox. There are some bugs in VirtualBox and broadcast packets. (Changing the card may bring up problems. You need to empty /etc/udev/rules.d/70-persistent-net.rules if the system does not recognize your virtual NIC)

Or just simply enable the WINS proxy in your samba configuration file Howto: http://mydebian.blogdns.org/?p=185

Aron

Posted 2010-01-18T20:52:35.943

Reputation:

0

The solution is easy. Dont use a NetBios/Samba share. Instead, run a FTP server on the Linux VM and then use Windows7 to create a mapped drive to the FTP server. Its way easier and the performance is way better.

djangofan

Posted 2010-01-18T20:52:35.943

Reputation: 2 459