千家信息网

centos在virtualbox复制后网卡重启报错

发表于:2025-02-01 作者:千家信息网编辑
千家信息网最后更新 2025年02月01日,在virtualbox克隆出来的centos启动后ifconfig没有看到eth0.接着重启网卡报错:service network restartShutting down loopback ins
千家信息网最后更新 2025年02月01日centos在virtualbox复制后网卡重启报错

在virtualbox克隆出来的centos启动后ifconfig没有看到eth0.接着重启网卡报错:

service network restart
Shutting down loopback insterface: [ OK ]
Bringing up loopback insterface: [ OK ]
Bringing up interface eth0: Device eth0 does not seem to be present,delaying initialization. [FAILED]


因为复制之前配置了两个网卡,启动了两个centos分别把/etc/udev/rules.d/70-persistent-net.rules对比发现,复制后的centos里的增加了2个网卡,分别是网卡eth3,eth4.然后上网查了下资料发现是因为复制之后mac地址重新分配,所以把eth3,eth4的mac地址复制到eth0,eth2,然后eth4,eth5.


重启后发现ifconfig还是没有网卡,service network restart还是失败。这时用setup命令,对eth0,eth2进行设置。然后重启网卡服务,那么ok了。


0