2011/01/10

Copy virtual machine on VmWare - network card issue

CURRENT CONFIGURATION: VMware ESXi 4, Ubuntu server 10.04
OBJECTIVE: Copy virtual machine on VMware
ISSUE: Network Card does not work after Linux virtual machine copy on VMware ESXi
 # /etc/init.d/networking restart
 * Reconfiguring network interfaces...
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.
stop: Unknown instance:
# ifconfig -a
eth0_rename Link encap:Ethernet  HWaddr 00:00:xx:00:xx:00
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
All NIC are installed. Check command is
# lshw -C network
SOLUTION: 
to comment all lines in /etc/udev/rules.d/70-persistent-net.rules
# vi /etc/udev/rules.d/70-persistent-net.rules
Example:
# PCI device 0x8086:0x100f (e1000)
# SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:00:00:00:xx:01", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100f (e1000)
# SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:00:xx:00:00:02", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Please reboot the Ubuntu server on VMware ESXi.

For Ubuntu server clone (image) creation (moving preparation) use next command on master clone (Source server) before final poweroff (shutdown).
sed -i 's/SUBSYSTEM/#SUBSYSTEM/g' /etc/udev/rules.d/70-persistent-net.rules

Комментариев нет: