1 查看系统网卡对应的硬件地址HWADDR:
# ifconfig | grep HWaddr
br100 Link encap:Ethernet HWaddr 00:25:90:F0:05:8D
eth0 Link encap:Ethernet HWaddr 00:25:90:F0:05:8C
eth1 Link encap:Ethernet HWaddr 00:25:90:F0:05:8D
virbr0 Link encap:Ethernet HWaddr 52:54:00:F3:BE:46
vnet0 Link encap:Ethernet HWaddr FE:16:3E:A0:2A:19
vnet1 Link encap:Ethernet HWaddr FE:16:3E:AA:D1:6B
vnet2 Link encap:Ethernet HWaddr FE:16:3E:F4:01:E4
vnet3 Link encap:Ethernet HWaddr FE:16:3E:F0:E3:F6
vnet4 Link encap:Ethernet HWaddr FE:16:3E:6F:F7:16
怎样查看识别码UUID
2 硬盘或者虚拟机迁移后会重启network,报错:
Restarting network (via systemctl): Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.
定位:配置文件中的HWADDR(即网卡的MAC地址)与实际网卡地址不符(迁移虚拟机时只复制了虚拟机磁盘,系统会给新虚拟机重新分配MAC地址),查找到新的MAC地址并改正确就好了。
使用ip addr查找指定网卡的新的MAC地址,更改即可。
-
[root@compute_power ~]# cat /etc/sysconfig/network-scripts/ifcfg-enP3p9s0f0
-
# Generated by IBM powerkvm installer
-
IPADDR=192.168.8.56
-
GATEWAY=192.168.8.254
-
HWADDR=40:f2:e9:5a:f6:88
-
NETMASK=255.255.255.0
-
BOOTPROTO=static
-
DEVICE=enP3p9s0f0
-
TYPE=Ethernet
-
ONBOOT=yes
-
[root@compute_power ~]# ip addr
-
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
-
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
-
inet 127.0.0.1/8 scope host lo
-
valid_lft forever preferred_lft forever
-
inet6 ::1/128 scope host
-
valid_lft forever preferred_lft forever
-
2: enP3p9s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
-
link/ether 40:f2:e9:5a:f6:88 brd ff:ff:ff:ff:ff:ff
-
inet 192.168.8.56/24 brd 192.168.8.255 scope global enP3p9s0f0
-
valid_lft forever preferred_lft forever
-
inet6 fe80::42f2:e9ff:fe5a:f688/64 scope link
-
valid_lft forever preferred_lft forever
-
3: enP3p5s0f1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
-
link/ether 40:f2:e9:5a:f6:89 brd ff:ff:ff:ff:ff:ff
-
4: enP3p5s0f2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
-
link/ether 40:f2:e9:5a:f6:8a brd ff:ff:ff:ff:ff:ff
-
5: enP3p5s0f3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
-
link/ether 40:f2:e9:5a:f6:8b brd ff:ff:ff:ff:ff:ff
-
6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
-
link/ether ae:43:d8:51:8c:19 brd ff:ff:ff:ff:ff:ff
-
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
-
valid_lft forever preferred_lft forever
-
7: virbr1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
-
link/ether 86:1a:27:eb:0a:9d brd ff:ff:ff:ff:ff:ff
-
inet 192.168.121.1/24 brd 192.168.121.255 scope global virbr1
-
valid_lft forever preferred_lft forever
阅读(2307) | 评论(0) | 转发(0) |