KVM 上的网络错误

KVM 上的网络错误

我正在尝试在 Debian 11 (Bullseye) 上运行 KVM 虚拟机

  • 我也在 ChromeOS 上从 crouton 运行这个,以防万一这真的很重要,但我认为不是。

这是错误:无法完成安装:“请求的操作无效:网络‘默认’未激活”

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/createvm.py", line 2001, in _do_async_install
    installer.start_install(guest, meter=meter)
  File "/usr/share/virt-manager/virtinst/install/installer.py", line 701, in start_install
    domain = self._create_guest(
  File "/usr/share/virt-manager/virtinst/install/installer.py", line 649, in _create_guest
    domain = self.conn.createXML(install_xml or final_xml, 0)
  File "/usr/lib/python3/dist-packages/libvirt.py", line 4366, in createXML
    raise libvirtError('virDomainCreateXML() failed')
libvirt.libvirtError: Requested operation is not valid: network 'default' is not active

我尝试了以下指南:https://askubuntu.com/questions/1036297/cant-start-kvm-guest-network-default-is-not-active 但提供的修复“sudo virsh net-start default”失败:

sudo virsh net-start default
[sudo] password for luhgarlicbread: 
error: Failed to start network default
error: internal error: Failed to apply firewall rules /usr/sbin/iptables -w --table filter --list-rules: # Warning: iptables-legacy tables present, use iptables-legacy to see them
iptables v1.8.7 (nf_tables): Could not fetch rule set generation id: Invalid argument
  • 另外:在 KVM > 编辑(顶部)> 连接详细信息上按左下角的“启动网络”按钮也会出错:
Error starting network 'default': internal error: Failed to apply firewall rules /usr/sbin/iptables -w --table filter --list-rules: # Warning: iptables-legacy tables present, use iptables-legacy to see them
iptables v1.8.7 (nf_tables): Could not fetch rule set generation id: Invalid argument



Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 101, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/network.py", line 69, in start
    self._backend.create()
  File "/usr/lib/python3/dist-packages/libvirt.py", line 3436, in create
    raise libvirtError('virNetworkCreate() failed')
libvirt.libvirtError: internal error: Failed to apply firewall rules /usr/sbin/iptables -w --table filter --list-rules: # Warning: iptables-legacy tables present, use iptables-legacy to see them
iptables v1.8.7 (nf_tables): Could not fetch rule set generation id: Invalid argument

有什么方法可以绕过所有网络检查/完全禁用 KVM 上的网络吗?有什么我可以尝试的提示、技巧或修复方法吗?这似乎有很多问题。

PS:我已经解决了所有其他问题。一个突出的问题是 libvirtd 不会以 systemctl 启动(我认为是),所以我只是从终端手动启动该过程并保留该术语。当我尝试使用 virt-manager 在 KVM 中创建虚拟机时,窗口打开。

相关内容