No network after copying an Ubuntu VMWare image
After you copy an Ubuntu image, you'll probably lose your network connectivity. After a little bit of digging, it turns out that Ubuntu persists the MAC address of the network device in /etc/udev/rules.d/*net.rules . The fix:
sudo rm /etc/udev/rules.d/*net.rulessudo shutdown -r now #to reboot

20 comments:
Just in case it hepls,rather than having VMware setup to "share" the host network use the vmware network adapter to get the guest to connect directly. The network adapter is one of the icons on the bottom corner of the wmware window.
Thanks, that note saved me a lot of time. :)
Thank you very much!
Saved me a ton of hairpulling
Thanks very much, solved my problem now.
Thanks dude, that saved my life.
Great tricks. Therefor I must be not lucky, still not work for me. Its worked partially as I got my eth0 back up, but I still cannot ping any other host... :(
Thanks! This was just what I needed.
kudos, I was working around this by adding in a second adapter - this is much better
Thanks for the tip - saved me a bit of hair pulling.
I looked a little further into that directory. Turns out the only file you need to remove is 70-persistent-net.rules
So I'd revise your tip as:
sudo rm /etc/udev/rules.d/70-persistent-net.rules
sudo shutdown -r now
saved my ass
*bookmarked*
This also worked great for LAMP appliance in VMWare . I believe LAMP is based on Ubuntu. Thank you very much for posting this tip!
LAMP isn't based on anything. It stands for a bundle of software, it's an acronym. Linux Apache MySQL PHP. Ubuntu can run LAMP but so can just about every other *nix distro you will come across.
Thanks a bunch for the instruction, saved a bunch of time.
Worked great.
Thanks
I found this on stackoverflow. Take a look and see if it works for you.
> sudo dhclient eth0
Cheers,
Josh
Boston, MA.
joshmolina.com
Thank you so much for posting! What a stupid bug in vmware, this wasted me hours and i didn't find the fix on their website.
Yeeeeees it Heeeeeelp!!!!!1
Maybe more "elegant" way:
vi /etc/udev/rules.d/70-persistent-net.rules
change the MAC Adress in the line to fit your needs and eventually change the name (example from eth1 to eth0).
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:56:d8:14:d1", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
reboot (or maybe a /etc/init.d/networking restart will do the job)
Greetz
Pete
http://linuxpeter.de
http://battlefieldsecrets.com
Thank you so much! You have saved me from a big problem.
3 years on, still saving people time. Excellent work. :o)
Saved my day, thanks!
Post a Comment