Lỗi card mạng khi clone máy ảo (CentOS)
Lổi này lúc trước mình cũng từng gặp qua, do Mac-address thay đổi, bạn chỉ cần chỉnh lại file /etc/udev/rules.d/70-persistant-net.rules như sau:
dòng
Khi clone máy ảo thường bị tình trạng như sau
# PCI device 0x1022:0x2000 (pcnet32) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<Old MAC Address>", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Đổi lại như sau:
# PCI device 0x1022:0x2000 (pcnet32) (custom name provided by external tool) SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”<New MAC Address>”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″
Tiếp theo chúng ta sửa file /etc/sysconfig/network-scripts/ifcfg-ethX (với ethX là tên card mạng máy của bạn)
dòng
HWADDR=<Old MAC Address>
Đổi lại thành
HWADDR=<New MAC Address>