Thursday, January 20, 2011

Enabling network interfaces in a cloned Ubuntu-based appliance

Ubuntu is a widely used/deployed Linux-based distro. In fact, according to Linux Format (February - 2011), Ubuntu is the third most popular desktop OS.
However, network interfaces of an Ubuntu-based appliance exhibits an annoying behaviour when that appliance is executed on top of a different hardware from it was installed. This behaviour is also experimented when a virtual disk image is cloned and then used in a fresh virtual machine.
This short recipe shows how to overcome this awkward behaviour.
  1. Be sure that the operating system is unaware of any network interface. Log into the appliance and execute the 'ifconfig' command. The image below shows only the loopback device.

  2. Log into the 'root' account.
  3. Execute the following command '> /etc/udev/rules.d/70-persistent-net.rules'. This command empties the '70-persistent-net.rules' file.
  4. Now reboot your appliance and execute the 'ifconfig' command, again. You must see an output similar to the image below.

No comments: