Configuring a network for CentOS 6 instances

There is a known issue with cloning CentOS 6 machines wherein the resulting machine retains information regarding the original's eth0 network interface (including MAC address).  As a result, it labels the new network interface as eth1, and is unable to start it because there are no network scripts referencing eth1.  This can be resolved in one of two ways, described as follows.

Method 1: Select Run sysprep when creating a template of a CentOS 6 instance.  This will prevent the problem from occurring.

Method 2: After creating a CentOS 6 instance without running sysprep, complete the following steps.

  1. In the Ignite management console, go to the Profile of the problematic instance.  Make note of the MAC Address (we will use 76:00:00:00:00:00 for this example).
  2. Log into the CentOS instance and run:
    • vi /etc/udev/rules.d/70-persistent-net.rules
    • There will be two entries: eth0 and eth1.  Type i to input data, and delete the entry with the MAC address that does not match the one from the first step above. If the remaining entry is for eth1, change it to eth0.  Press ESC and type :wq to write the changes and exit.
  3. Run:
    • ls /etc/sysconfig/network-scripts
    • If ifcfg-eth1 is present, delete it as follows:
      • rm -d /etc/sysconfig/network-scripts/ifcfg-eth1
  4. Runthe command:
    • vi /etc/sysconfig/network-scripts/ifcfg-eth0
    • Type i to input data, and add a HWADDR={MAC Address} entry.  Set ONBOOT=yes if it's not set already.  Press ESC and type :wq to write the changes and exit.
  5. To start the network interface, run the command:
    • ifup eth0
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request