gnome-boxでVM起動問題を解決するには?

gnome-boxでVM起動問題を解決するには?

簡単に言うと: CONAN01という名前の私の仮想マシンはgnome-boxesから起動しません。他のエラーを受け取ったり見たりしても、その背後にある実際の問題が何であるかはわかりません。

エラー1:

Gnomeデスクトップ環境でgnome-boxを起動し、仮想マシン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-boxを起動し、マウスを使用して仮想マシンCONAN01をクリックして実行すると、次のエラーが発生します。

GNOMEボックス

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ボックス--check

情報出力:

(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-boxはまだ古い場所が有効だと思います。私の意図は "/home/myusername/"を変更することです。ローカル/共有/GNOMEボックス/イメージ":

virsh プール情報 gnomebox

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ボックス

<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 プール編集 gnome box

virsh pool-dumpxml GNOMEボックス

<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これは、仮想マシンがこのインスタンスに作成され、基本的に複雑なネットワークアクセスを使用できないためです。

setuidビットを提供してqemu-bridge-helper有効にします。

sudo chmod 4755 /usr/lib/qemu/qemu-bridge-helper

または、そのフォルダ内のすべての実行可能ファイルを有効にすることもできます。

sudo chmod 4755 /usr/lib/qemu/*

より複雑な情報はこことここにあります:

おすすめ記事