How to fix networking after cloning an Ubuntu 8 VM

Stolen from: http://weblog.jamisbuck.org/2008/8/15/cloning-ubuntu-hardy-image-in-vmware-fusion

* “sudo hostname blah”, to set the hostname. This doesn’t change it permanently, so you’ll also want to:
* “sudo vim /etc/hostname”. Change the contents of the file to the hostname you want. Then:
* “sudo vim /etc/hosts”. Replace all mentions of the old hostname with the new hostname.
* “sudo vim /etc/udev/rules.d/70-persistent-net.rules”. There will be two entries in this file. The first points eth0 at the old MAC address, and the second points eth1 at the new. Go ahead and delete the first entry, and change “eth1” to “eth0” in the second (and now only) entry.
* “sudo shutdown -r now” to restart your virtual machine.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.