感谢支持
我们一直在努力

KVM虚拟机实例网络无法启动一例

创建的KVM虚拟机实例,网络无法启动。尝试:

service network restart    提示:

device “eth0” does not seem to be present, delaying initialization

查看网络设备:

ls /etc/sysconfig/network-scripts/ifcfg*
/etc/sysconfig/network-scripts/ifcfg-eth0  /etc/sysconfig/network-scripts/ifcfg-lo

ifconfig -a  查看:

eth1      Link encap:Ethernet  HWaddr FA:16:3E:32:79:88 
          inet6 addr: fe80::f816:3eff:fe32:7988/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:159 errors:0 dropped:0 overruns:0 frame:0
          TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:17826 (17.4 KiB)  TX bytes:12487 (12.1 KiB)
          Interrupt:10 Base address:0xa000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

可以看出是网卡配置异常,记录下eth1的mac地址,修改/etc/sysconfig/network-scripts/ifcfg-eth0 为:

DEVICE=”eth1″
BOOTPROTO=”dhcp”
HWADDR=”FA:16:3E:32:79:88″
NM_CONTROLLED=”yes”
ONBOOT=”yes”

改名:

mv /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1

再重启网络服务:

service network restart

网络正常了!

赞(0) 打赏
转载请注明出处:服务器评测 » KVM虚拟机实例网络无法启动一例
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏