Solution for : Error in my VM “SIOCSIFADDR: No such device eth0 after cloning

Actually when you clone a Virtual machine IP address conflict will come.


So we must be care full in production environment when turning on both the
Production and cloned virtual machines.

If you create a new Virtual machine before cloning and then add vmdk file 
( cloned from vm) then there will be

a problem " SIOCSIFADDR: No such device eth0 " this is because cloned 
vmdk file has one MAC address and when VM is created it generates another 
MAC address so both address will be added so no device will be added to 
solve this probelem


Go to

# Ubuntu
sudo mv /etc/udev/rules.d/70-persistent-net.rules
 /etc/udev/rules.d/70-persistent-net.rules.old

#Debian
sudo mv /etc/udev/rules.d/z25_persistent-net.rules 
/etc/udev/rules.d/z25_persistent-net.rules.old
 
 
or you can simply remove 70-persistent-net.rules after 
giving it a new static ip address 

or go to /etc/udev/rules.d/70-persistent-net.rules
 
its content will be like this 
 
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:0c:29:50:XX:XX", ATTR{type}=="1", NAME="eth0"

# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", 
ATTR{address}=="00:0c:29:36:XX:XX", ATTR{type}=="1", NAME="eth1" 
 
 
now go and delete the first line eth0 this is created by the
cloned vm and not by vmware when creating a vm
so delete that line change the second line eth1 to eth0 and reboot
the machine 
this will solve your problem....
 
Any queries post in comments section i will be replying  

No comments: