本文主要是介绍KVM【virsh start centos7.0】启动时失败,报错:error: Network not found: no network with matching name ‘default‘,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
在命令行启动KVM虚拟机时报错:启动失败,找不到 default 网络
[root@localhost ~]# virsh start centos7.0
error: Failed to start domain centos7.0
error: Network not found: no network with matching name 'default'
但是此前是有default网络的,过了一夜重新开机后再启动就报错了。首先查找一下default.xml 的存放路径,
[root@localhost ~]# find / -name "default.xml"
/run/libvirt/storage/default.xml
/etc/libvirt/storage/default.xml
/etc/libvirt/storage/autostart/default.xml
/usr/share/backgrounds/default.xml
/usr/share/libvirt/networks/default.xml
可以看出有很多 xml ,选择与network和libvirt有关的进行执行
[root@localhost ~]# virsh net-define /usr/share/libvirt/networks/default.xml
Network default defined from /usr/share/libvirt/networks/default.xml[root@localhost ~]# virsh net-start default
Network default started
启动成功了,进行查看:
[root@localhost ~]# virsh net-listName State Autostart Persistent
----------------------------------------------------------default active no yes
最后启动KVM虚拟机就好了:
[root@localhost ~]# virsh start centos7.0
Domain centos7.0 started
图形化界面查看,也已经成功:
这篇关于KVM【virsh start centos7.0】启动时失败,报错:error: Network not found: no network with matching name ‘default‘的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!