情况说明

11464886-60c52db8ac659d95.png
11464886-05c074c70a4e15b4.png

改网卡名

改拥有新虚拟机MAC地址的网卡名称为eth0;
注释掉原eth0;

[root@lebron ~]# vim /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 0x8086:0x100e (e1000)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:1c:68:04", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:ee:4b:73", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:6c:8b:62", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

改eth0的MAC地址

[root@lebron ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=08:00:27:6C:8b:62
TYPE=Ethernet
UUID=1e3c54ec-0df1-42f7-a577-6a18be5a839e
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐