0236.3 10-07-2010 / 10:22 pm ...   Haxoring I Love You Evil VMWare

baby

This is more for my memory than anything else. But it may help some people out there with VMWare running through their dreams. Moving Virutal Linux Guests from one PC to another can be a bit of a pain. In particular the internet on the virtual machine.

I’m running Ubuntu 10.04 LTS as a virtual machine using NAT to distribute internet to the guest from the host machine and then routing that internet back out of the virtual machine to a router to distribute to my various devices. I know, why all this useless shit?

You can thank China and their Windows ONLY friendly University Authentication software known as Dr. Com. Let me just say… I hate Dr. Com. It’s not a doctor. It’s more like a bum with a knife, but back to the story.

I’ve had to move my VM multiple times from PC to PC to keep my Skype phone always up and running and the internet always seemed to break. At first I just reinstalled Ubuntu. This got tedious so I decided to finally research what was happening.

First of all moving the virtual machine adds two new network interfaces instead of reusing the old ones it seems. Thus new mac and Ubuntu creates them accordingly. So although you may not see them at first now you have a eth0, eth1, eth2, and eth3. SuXors! eth0 and eth1 don’t really exist and need to go!

Simply edit the following file. Yes I use nano. I hate VI. Quiet hackers!

nano /etc/udev/rules.d/70-persistent-net.rules

You’ll see lines that say, SUBSYSTEM== blah blah blah. Find the lines that contain eth0 and eth1 and comment them out or delete them.

Now let’s restart the network interfaces.

/etc/init.d/networking restart

By the way you may need to check the following files for your ip and dns and just make sure they look okay. If you change them you have to restart your network interfaces again.

nano /etc/network/interfaces
nano /etc/resolv.conf

Now there’s a good possibility that VMWare has screwed up all your network interface settings too. So we have to check them in VMWare. Under Edit->Virtual Network Editor we can check it.

In my case my vmnet0 interface was originally set for bridged and my vmnet 8 was set for NAT (this is the one for my internet). They got flip flopped. I flipped them back around.

Also you’ll want to check the machine preferences. So right click on the machine and choose settings. Hopefully both your network interfaces are there, but if not, add the second one. Make sure for each network interface you chose the right virtual network (ie. vmnet0 or vmnet8). Also make sure both network interfaces have selected "Connect at power on" and "Connected".

Wah la! You should now have working internet on your NAT connected machine. If not, hrmmm…. restart the machine and cross your fingers.

This Site Powered by:
Badassness