简而言之: 我名为 CONAN01 的虚拟机未在 gnome-boxes 中启动,我收到/看到不同的错误,但不知道它们背后的真正问题是什么:
错误1:
从 Gnome 桌面环境启动 gnome-boxes 并单击虚拟机 CONAN01 启动它时,我收到一条弹出消息,其中包含打开错误日志的选项,在该错误日志中我可以看到最后几行,其中状态:
2022-06-15 09:39:22.707+0000: Domain id=1 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)
2022-06-15T09:39:22.800582Z qemu-system-x86_64: warning: This family of AMD CPU doesn't support hyperthreading(2)
Please configure -smp options properly or try enabling topoext feature.
2022-06-15T10:30:56.757942Z qemu-system-x86_64: terminating on signal 15 from pid 3544 (/lib/systemd/systemd)
错误2:
当使用终端启动 gnome-boxes,然后使用鼠标单击并运行我的虚拟机 CONAN01 时,我收到以下错误:
侏儒盒子
gnome-boxes 启动时的错误输出:
(gnome-boxes:709111): Gtk-WARNING **: 22:02:27.216: GtkFlowBox with a model will ignore sort and filter functions
(gnome-boxes:709111): Gtk-WARNING **: 22:02:27.217: GtkListBox with a model will ignore sort and filter functions
(gnome-boxes:709111): GLib-GObject-WARNING **: 22:02:28.067: ../../../gobject/gsignal.c:2715: handler '2888' of instance '0x562fb55b44e0' is not blocked
虚拟机 CONAN01 启动时出现错误输出:
(gnome-boxes:709111): Boxes-WARNING **: 22:02:32.045: machine.vala:605: Failed to start CONAN01: Unable to start domain: internal error: /usr/lib/qemu/qemu-bridge-helper --use-vnet --br=virbr0 --fd=31: failed to communicate with bridge helper: Transport endpoint is not connected
stderr=failed to create tun device: Operation not permitted
错误3:
当执行 gnome-boxes – CLI 通过执行必要的命令进行检查时,我收到以下信息:
gnome-boxes --检查
信息输出:
(gnome-boxes:717997): Boxes-WARNING **: 22:50:30.599: util-app.vala:376: Failed to execute child process ?restorecon? (No such file or directory)
• The CPU is capable of virtualization: yes
• The KVM module is loaded: yes
• Libvirt KVM guest available: yes
• Boxes storage pool available: no
/root/.local/share/gnome-boxes/images is known to libvirt as GNOME Boxes’s storage pool but this directory does not exist
• The SELinux context is default: no
Report bugs to <http://gitlab.gnome.org/gnome/gnome-boxes/issues>.
Boxes home page: <https://wiki.gnome.org/Apps/Boxes>.
尽管使用必要的命令更改了存储池的位置,但显示 XML 的输出 - 配置没有更改,virsh 和 gnome-boxes 仍然认为旧位置有效,我的意图是更改“/home/myusername/” .local/share/gnome-boxes/images”:
virsh 池信息 gnome-boxes
Name: gnome-boxes
UUID: edb0bf37-df0f-4295-a3cf-0ced96970de0
State: running
Persistent: yes
Autostart: yes
Capacity: 907,44 GiB
Allocation: 531,49 GiB
Available: 375,95 GiB
virsh pool-dumpxml gnome-boxes
<pool type='dir'>
<name>gnome-boxes</name>
<uuid>edb0bf37-df0f-4295-a3cf-0ced96970de0</uuid>
<capacity unit='bytes'>974357393408</capacity>
<allocation unit='bytes'>570679726080</allocation>
<available unit='bytes'>403677667328</available>
<source>
</source>
<target>
<path>/root/.local/share/gnome-boxes/images</path>
<permissions>
<mode>0744</mode>
<owner>0</owner>
<group>0</group>
</permissions>
</target>
</pool>
sudo virsh pool-编辑 gnome-boxes
virsh pool-dumpxml gnome-boxes
<pool type='dir'>
<name>gnome-boxes</name>
<uuid>edb0bf37-df0f-4295-a3cf-0ced96970de0</uuid>
<capacity unit='bytes'>974357393408</capacity>
<allocation unit='bytes'>570679726080</allocation>
<available unit='bytes'>403677667328</available>
<source>
</source>
<target>
<path>/root/.local/share/gnome-boxes/images</path>
<permissions>
<mode>0744</mode>
<owner>0</owner>
<group>0</group>
</permissions>
</target>
</pool>
答案1
解决方案是在 qemu 实例 qemu:///session 上启用网络,因为gnome-boxes
在该实例上创建虚拟机,默认情况下无法进行复杂的网络访问。
通过提供qemu-bridge-helper
setuid 位来启用它:
sudo chmod 4755 /usr/lib/qemu/qemu-bridge-helper
或者您可以启用该文件夹中的所有可执行文件:
sudo chmod 4755 /usr/lib/qemu/*
可以在这里和这里找到更复杂的信息: