我无法启动libvirt 的默认网络。我得到以下错误journalctl
:
Jun 06 15:22:43 jenia libvirtd[889326]: Unable to create bridge virbr0: Package not installed
我确实安装了软件包ebtables
并重新启动了bridge-utils
,但问题仍然存在。dnsmasq
libvirtd
有人能告诉我我缺少什么包吗?我正在使用 archlinux。
谢谢
附言
我正在使用的 GUI(虚拟机管理器)为我提供:
Error starting network 'default': Unable to create bridge virbr0: Package not installed
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 66, in newfn
ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/network.py", line 75, in start
self._backend.create()
File "/usr/lib/python3.8/site-packages/libvirt.py", line 3174, in create
if ret == -1: raise libvirtError ('virNetworkCreate() failed', net=self)
libvirt.libvirtError: Unable to create bridge virbr0: Package not installed
答案1
我认为,当 libvirt 与内核通信时会出现该错误消息。因此,猜测您安装的内核缺少桥接内核模块。也许 dmesg 会告诉您有关缺少哪些内容的更多信息。如果这是自定义内核,请确保您编译了桥接支持。如果这是发行版提供的内核,则查找与内核相关的任何额外发行版软件包。
答案2
我遇到了同样的问题。我通过以下方式修复了它
virsh net-start default
由于某种原因,virt-manager 无法启动它,但 virsh 可以。但请确保使用以下命令检查您是否具有默认网络virsh net-list --all
答案3
我使用virt-manager几天后就出现了这个错误,这意味着它不是缺少软件包的问题。
修复方式:在 virt-manager 中选择虚拟机 > 编辑 > 连接详细信息 > 虚拟网络 > 默认 > 勾选“启动时” > 应用
然后重新启动,就可以了。
这是 pacman Qi
$ pacman -Qi libvirt [0]
Name : libvirt
Version : 1:9.2.0-1
Description : API for controlling virtualization engines (openvz,kvm,qemu,virtualbox,xen,etc)
Architecture : x86_64
URL : https://libvirt.org/
Licenses : LGPL GPL3
Groups : None
Provides : libvirt=9.2.0 libvirt.so=0-64 libvirt-admin.so=0-64 libvirt-lxc.so=0-64 libvirt-qemu.so=0-64
Depends On : libpciaccess yajl fuse3 gnutls parted libssh libxml2 numactl polkit
Optional Deps : libvirt-storage-gluster: Gluster storage backend
libvirt-storage-iscsi-direct: iSCSI-direct storage backend
gettext: required for libvirt-guests.service [installed]
openbsd-netcat: for remote management over ssh [installed]
dmidecode: DMI system info support [installed]
dnsmasq: required for default NAT/DHCP for guests [installed]
radvd: IPv6 RAD support
iptables-nft: required for default NAT networking [installed]
qemu-desktop: QEMU/KVM support
qemu-emulators-full: Support of additional QEMU architectures
lvm2: Logical Volume Manager support [installed]
open-iscsi: iSCSI support via iscsiadm
swtpm: TPM emulator support