journal features
movie reviews
photo of the day

no eth0 after linode moved me to kvm

the journal of Michael Werneburg

twenty-seven years and one million words

Toronto, 2016.09.09

Linode, my internet hosting provider, urged me to move my VM to a new infrastructure; doing so cost me 14 hours of downtime. The problem was that moving to the new infrastructure meant new network hardware. New hardware means a new "MAC" address, which is a (supposedly) world-unique identifier for that network "interface". The operating system (CentOS 6) on my virtual machine (VM) was of course still configured for the old hardware, and while it had created configuration files for the new hardware upon detection, it failed to associate the new hardware with the Internet. My VM had no IP networking, and that meant I couldn't reach the VM to fix it. All the while, my websites were down.

I contacted Linode support, and they gave me a one-line response that wasn't helpful. After an hour of messing about myself, I told them that their solution hadn't worked, and that I was unhappy that this had happened because of a change they'd pushed on me. They told me that they don't manage that kind of problem. I was on my own.

First, Linode provides a virtual console through the administration web interface. It's called lish, and while limited it's vastly better than nothing.

Then, I quickly found sources like this and this and this on the 'net. I'm writing my version as a "best of".

1. Find your existing configuration in:

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

2. There may or may not be multiple entries like:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="MAC address", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

3. Conventional wisdom says to delete the one with 'eth0' in the final stansa, and replace the text "eth1" in second with "eth0". If that's possible for you, skip the next steps.

4. In my case, something had gone wrong, and there was no eth1 entry. From the command line, I used "ifconfig -a" to find the MAC address attached to the 'eth1' interface:

# ifconfig -a | grep eth0

HWaddr F2:3C:91:DF:9C:5D

5. Going back to the 70-persistent-net.rules file, I revised the existing 'eth0' line with the new MAC address.

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="F2:3C:91:DF:9C:5D", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

6. I then modified the file:

/etc/sysconfig/network-scripts/ifcfg-eth0

Specifically, I made sure there was a line at the bottom with:

HWADDR="F2:3C:91:DF:9C:5D"

7. The general advice at this point is to reboot, but this didn't fix anything for me. Instead, I followed the sage advice of 'doshea' on this page, and issued the following two commands:

# start_udev
# service network restart

All in, this took me about 1:20 to get right, but that was split between 23:30 - midnight and 07:00 - 07:50.

Next time, I'll ignore Linode's offers of "upgrades". Their reputation has been bad stained with poor handling of a series of security breaches, but I've simply been too busy to get around to moving away. I think, with this non-response by their support staff to a problem that originated with them, I'll finally move on.

rand()m quote

Like beauty and honesty, promiscuity is in the eye of the beholder...

—Hunter S. Thompson