Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After cloning my CentOS VM in Virtualbox (I used the Reinitialize the MAC address of all network cards option), the original and the clone VM both now has 127.0.0.1 as their IP.

Anyone knows how to fix it? The vbox's IP used to follow my network's IP (i.e., if host is 192.168.0.2 then the vbox is 192.168.0.3 but now the vboxes is both 127.0.0.1) I am using Bridged Adapter BTW.

EDIT: OK, I now realize eth0 is not running on start up. My question now is how enable eth0 on startup? Note that it used to start automatically before I performed the clone.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

For your this question how enable eth0 on startup?

Open /etc/sysconfig/network-scripts/ifcfg-eth0 file in that

change ONBOOT=no

To

ONBOOT=yes

share|improve this answer

I just find from on other another site, you need to edit the file name 70-persistent-net.rules under /etc/udev/rules.d/ change the MAC address to match with the clone VM virtualbox

so edit two files

  1. /etc/udev/rules.d/70-persistent-net.rules
  2. /etc/sysconfig/network-scripts/ifcfg-eth0 -- from heavyd

change the MAC address in both files to match with the VM VirtualBox assign if you click on the right click cloneVMvirutalBox=>Setting=>Network=>Adapter 1 tap there is a Advanced will provide the MAC address.

Hope this will help when some one come across this site.

share|improve this answer

CentOS ties the network configuration script to a specific MAC address, so when you changed your MAC address you essentially broke the script. You can fix it by editing the script as root:

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

In the script look for the line HWADDR line. Update the value to match your new MAC address and then reboot.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.