克隆镜像后重置网卡的UUID

克隆镜像后重置网卡的UUID(唯一识别符)

# vim /etc/sysconfig/network-scripts/ifcfg-eth1 
...
##删除MAC地址行
...


# cat /etc/udev/rules.d/70-persistent-net.rules 
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:65:65:3c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:7a:da:a7", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

##删除MAC地址和UUID的绑定文件


# shutdown -r now
##重启Linux

 

posted @ 2020-03-18 15:50  Justtosee  阅读(665)  评论(0编辑  收藏  举报