如何在 Gnome-Boxes 中配置 UEFI 客户机?

如何在 Gnome-Boxes 中配置 UEFI 客户机?

我目前正在测试主线内核,这就是为什么我目前无法使用 VirtualBox,因此我正在研究其他可用选项,Gnome-Boxes 看起来不错。但是尝试导入我的 VirtualBox UEFI VDI 会导致无法启动虚拟机(Ubuntu、Fedora、Windows 10 Preview)。我的 Endless OS 安装在传统模式下启动正常。

我必须做什么才能告诉 Gnome-Boxes 使用 UEFI/TianoCore/edk2 固件启动特定机器?我已经安装了奥维还尝试了 virt-manager,使用 UEFI 导入和启动 VDI 没有任何问题,但自动屏幕调整大小在那里不起作用,将 virt-manager 配置的 VM 导入 gnome-boxes 仍然会导致后者尝试将它们作为旧版启动。我昨天花了几个小时测试所有这些,但对这些程序及其组件知之甚少,VirtualBox GUI 和 shell 命令到目前为止足以完成任务(我还尝试从 SVN 构建最新的主干,但没有成功)。

我在 xenial 上,但也可以在 zesty 上测试。我也检查了 gnome-boxes 和 ovmf/edk2 的更新日志,但找不到任何相关内容。

因此,如果有人可以帮助我让 UEFI 客户机在 gnome-boxes 中启动、屏幕调整大小以在 virt-manager/viewer 中工作,或者解释为什么我目前无法实现这些,我将非常感激。


关于 virt-manager 中的屏幕调整大小,以下是 Ubuntu 客户机的配置。xserver-xorg-video-qxlspice-vdagent安装了客户机,但是仍然使用 Gallium 0.4 llvmpipe,相应的服务(spice-vdagent(d))在 systemd 中处于活动状态,但报告spice-vdagentd[703]: Error getting session for pid 1992: No such device or address。剪贴板不起作用。 我无法按照以下说明使其工作:https://www.linux-kvm.org/page/SPICE

$ virsh dumpxml ubuntu-zesty
<domain type='kvm' id='10'>
  <name>ubuntu-zesty</name>
  <uuid>1bbde115-8968-4f27-8aca-5f498757fea7</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/ubuntu-zesty_VARS.fd</nvram>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-model'>
    <model fallback='allow'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <pm>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='vdi'/>
      <source file='/media/livewire/Lionheart/virtmanager/images/Zesty-UEFI.vdi'/>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
    <interface type='network'>
      <mac address='52:54:00:8c:92:60'/>
      <source network='default' bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/24'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/24'>
      <source path='/dev/pts/24'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='spicevmc'>
      <target type='virtio' name='com.redhat.spice.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='spice' port='5900' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
      <image compression='off'/>
    </graphics>
    <sound model='ich9'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </sound>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir0'/>
    </redirdev>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir1'/>
    </redirdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='apparmor' relabel='yes'>
    <label>libvirt-1bbde115-8968-4f27-8aca-5f498757fea7</label>
    <imagelabel>libvirt-1bbde115-8968-4f27-8aca-5f498757fea7</imagelabel>
  </seclabel>
</domain>

答案1

一旦您将客户机显卡型号更改为 QXL、将显示更改为 Spice,并且(对于 Windows 客户机)从 virtio-win ISO 安装 QXLDOD 驱动程序,virt-manager 和 virt-viewer 中的屏幕调整大小就应该可以工作(在客户机操作系统中)。

https://www.spice-space.org/spice-user-manual.html

“当使用 QXL 驱动程序时,客户操作系统的分辨率将自动调整为客户端窗口的大小。”

https://fedoraproject.org/wiki/Windows_Virtio_Drivers#ISO_contents

“qxldod/:适用于 Windows 8 及更高版本的 QXL 图形驱动程序。(构建 virtio-win-0.1.103-2 及更高版本)”

相关内容