网站default未启动_无法启动虚拟机,错误为“无网络,名称匹配为'default'”

在更新libvirt后,发现无法启动VM,因为默认的'virbr0'虚拟网桥缺失。解决方法包括从另一台服务器复制'virtbr0'配置文件,删除并重新创建uuid,以及检查问题服务器中的虚拟网桥。完成这些步骤后,问题得以解决。若启动default时遇到问题,还需重启libvirtd。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

网站default未启动

I update libvirt version and want to start VM with the new libvirt tools but I failed as follows.

我更新了libvirt版本,并想使用新的libvirt工具启动VM,但是失败如下。

> sudo virsh start kvm1error: Failed to start domain kvm1
error: Network not found: no network with matching name 'default'

It seems that the default ‘virbr0’ is missing after I update libvirt so I solve this problem like following.

似乎在更新libvirt之后缺少默认的'virbr0',所以我像下面这样解决了这个问题。

1, copy a ‘virtbr0’ config file from another server with same configuration.

1,从另一台具有相同配置的服务器复制“ virtbr0”配置文件。

$ sudo virsh net-dumpxml default
<network>
  <name>default</name>
  <uuid>afd4e923-66cb-45ca-9120-1e46e72899a3</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr0' stp='on' delay='0'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254'/>
    </dhcp>
  </ip>
</network>

2, remove the uuid in above configuration file and create it in the problem server.

2,删除上面配置文件中的uuid,并在问题服务器中创建它。

# virsh net-create default.xml

3, Check the virtual bridge in the problem server.

3,检查问题服务器中的虚拟网桥。

# virsh net-list
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     no            no

Now, everything goes well.

现在,一切顺利。

You may also happen to following problem when you want to start default.

要启动默认值时,您可能还会遇到以下问题。

# virsh net-create ./default.xml 
error: Failed to create network from ./default.xml
error: internal error: Failed to initialize a valid firewall backend

Do following to solve it:

请执行以下操作来解决它:

#apt-get install firewalld
# apt-get install ebtables
# apt-get install iptables
# /etc/init.d/libvirt-bin restart

The last step is to restart libvirtd.

最后一步是重新启动libvirtd。

References:
[1] http://unix.stackexchange.com/questions/8351/how-to-create-a-dupe-of-a-kvm-libvirt-virt-manager-vm/33584#33584
[2] http://libvirt.org/sources/virshcmdref/html/sect-net-create.html
[3] https://bbs.archlinux.org/viewtopic.php?id=198744

参考文献:
[1] http://unix.stackexchange.com/questions/8351/how-to-create-a-dupe-of-a-kvm-libvirt-virt-manager-vm/33584#33584
[2] http://libvirt.org/sources/virshcmdref/html/sect-net-create.html
[3] https://bbs.archlinux.org/viewtopic.php?id=198744

Answered by harryxiyou.
由harryxiyou回答。

翻译自: https://www.systutorials.com/cannot-start-vm-with-error-no-network-with-matching-name-default/

网站default未启动

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值