Network patch for Linux systems under VMWare

If you’re experiencing problems with networking under Linux in VMWare (e.g. loosing connection after switching out and back in the virtual machine, after Pause-Resume, or after your host (A)DSL connection “restarts”), try the following simple patch (tested on FC4 and Ubuntu; you can always simply revert the changes to get to where you were).

Of course, all the files you have to edit are system files, thus you have to be sudo bash‘ed (or su‘ed) into the root account.

1. Comment out the line in /etc/iftab to get the eth0 interface to work, i.e. put ‘#‘ at the beginning of the line that reads something like “eth0 mac ...“.

Note – it’s typically statically linked to the mac address obtained during installation, that is most probably not valid anymore – VMWare changes this over time (or, if you’re using a downloaded VMWare appliance, it’s the mac address of whatever machine they built this appliance on).

2. Change the line that reads “nameserver” in your /etc/resolv.conf file to point to your DNS server (feel free to use the DNS that your host system is using, instead of the usual that VMWare redirects to your host’s DNS).

Note – sometimes it’s necessary to restart the system after this, or at least to log out and back in.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s