Jan 10
1
Why can’t things just be simple? Really, it’s only a few steps… Surely the folks at VMWare could fix this. Ugh!
When cloning a Linux virtual machine (Ubuntu Server, in my case – YMMV based on distro), the clone’s networking fails to start up. Doing an ifconfig only shows the loopback adapter and no amount of rebooting, adding / removing the adapter in the VM’s settings, or cussing will make it work.
Thanks to this post I found by Jamis Buck (thanks!), it’s easily fixed (okay, his post was for VMWare Fusion, but it works equally well in VMWare Workstation):
- “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.
Again, why can’t they fix this?!?! Oh well, enough ranting for the day.