![KVM 上的網路錯誤](https://rvso.com/image/231054/KVM%20%E4%B8%8A%E7%9A%84%E7%B6%B2%E8%B7%AF%E9%8C%AF%E8%AA%A4.png)
我正在嘗試在 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 中建立虛擬機器時,視窗會開啟。