I run Ubuntu on my main machine, but needed Windows for a project for one of my clients. I installed the free VMWare Server from the Ubuntu commercial repository and installed Windows XP Pro on a virtual machine.
There are three different networking modes in VMWare to give the virtual machine network access:
I wanted to keep my virtual Windows box as isolated as possible for security reasons – Windows boxes get compromised so easily. I used bridged networking to give the virtual machine its own IP address and blocked outgoing Internet access for that machine on my router firewall.
I wanted to share files between the Linux host and the Windows virtual machine. I used Samba on Linux to share some directories then tried to connect to them from the Windows VM. It couldn’t connect and just timed out without a helpful error message.
After messing with Samba for a while and reading the VMWare Samba docs I was no further forward. I tried using IE on Windows to connect to the web server on my Linux box. No dice. It timed out as well.
I read some discussion in the VMWare forums about similar problems using bridged networking, but working fine with NAT.
This led to the answer on Launchpad – the problem was the network card. Apparently some network cards optimise by discarding packets they have already seen. Because the networking is effectively between two machines on the same network card, some of the data was getting lost.
The solution is to disable these settings on the Ethernet card using:
ethtool -K eth0 sg off rx off tx off
or
ethtool -K eth0 sg off rx off tx off tso off
depending on the settings supported by your network card.
I ran this command and it worked immediately. Note that when you reboot you will need to issue this command again. You could add it to /etc/rc.local
or similar to have it issued automatically.