ESXi 克隆Linux虚机时,原来的 eth0 会变成 eth1,而且网卡的 MAC 地址也发生了变化,导致新的虚拟机的硬件与老的 /etc/sysconfig/network-scripts/ifcfg-eth0 配置不符。

解决方法:
1. 删除 /etc/sysconfig/network-scripts/ifcfg-eth0 中与 MAC 地址相关的配置;
2. 修改 /etc/udev/rules.d/70-persistent-net.rules 配置

操作如下:

1. /etc/sysconfig/network-scripts/ifcfg-eth0 - remove the HWADDR= line ;
修改后的 ifcfg-eth0 配置为
DEVICE=eth0
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none

2. /etc/udev/rules.d/70-persistent-net.rules - remove from ATTR{address}== up to and including the next comma.
修改后的 70-persistent-net.rules 文件配置为

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:3f:3a:0d", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

相关文章:

  • 2022-12-23
  • 2021-12-18
  • 2021-10-27
  • 2021-05-02
  • 2021-09-12
  • 2021-12-16
  • 2021-09-06
  • 2021-04-25
猜你喜欢
  • 2021-09-02
  • 2022-12-23
  • 2021-09-06
  • 2021-05-12
  • 2021-12-04
  • 2021-05-27
  • 2021-07-07
相关资源
相似解决方案