Comments activated

Posted on 15/02/

I've activated comments for the posts. You can rate them too... (so now I can know if you like the posts, and if I should stop blabbing about some topic :p)

Please be polite, and try to apport some extra content to the posts, without flaming, insulting and such. These actitudes will not be tolerated, and comments will be deleted without any type of explanation.

Finding your lost eth

Posted on 15/02/

When we started cloning and playing around with VM images something strange started happening. The other day one of our hosting providers did a Bare Metal Recovery of a server, and the same issue appeared. So I guess I'll lessen the agony for others to come.

When you restore an image of a Debian (other distros apply too...) on another machine, net interfaces stop working. You will observe that if you had eth0 and eth1, these are not appearing in ifconfig output. Instead you have eth2 and eth3, which are not configured (ifup command refuses to bring them up), because /etc/network/interfaces only refers to unexistant eth0 and 1.

You can always edit the entries in the interfaces file and you're running again... but clone again... and you have the same problem...

If you run ifconfig -a, you get a surprise. eth0 and eth1 still exist!

This is because of the udev package, that Debian uses, which does'nt reassing hardware names on every boot (so one device gets one identifier forever). Since we are switching the hardware when we create a new VM, and the ethernet interfaces are identified by thier MAC address, we get a new ethx interface on the new machine.

The solution is quite easy:

rm /etc/udev/rules.d/z25_persistent-net.rules
reboot
Now you get your eth0 back again