Flapping Head » VMWare http://scottbarnham.com/blog Code and comments on web development, Django, Python and things (un)related. Wed, 22 Jun 2016 04:22:53 +0000 en-US hourly 1 http://wordpress.org/?v=4.3 VMWare on Ubuntu Linux with bridged network to XP http://scottbarnham.com/blog/2007/08/23/vmware-on-ubuntu-linux-with-bridged-network-to-xp/ http://scottbarnham.com/blog/2007/08/23/vmware-on-ubuntu-linux-with-bridged-network-to-xp/#comments Thu, 23 Aug 2007 12:18:22 +0000 http://scottbarnham.com/blog/2007/08/23/vmware-on-ubuntu-linux-with-bridged-network-to-xp/ XP on Linux

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.

VMWare networking modes

There are three different networking modes in VMWare to give the virtual machine network access:

Host-only
A private network between the host and VM. The VM can’t be accessed by other machines on the network.
NAT
The VM shares the IP address of the host.
Bridged
The VM has its own IP address and can be accessed by the host and other machines on the network as if it was a separate box.

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.

Networking problems with Samba/SMB

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.

It’s the network card settings

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.

]]>
http://scottbarnham.com/blog/2007/08/23/vmware-on-ubuntu-linux-with-bridged-network-to-xp/feed/ 10