I'm currently testing mainline kernels which is why I can't use VirtualBox at the moment, thus I'm looking at the other options available and Gnome-Boxes looks neat. Trying to import my VirtualBox UEFI VDIs however results in non-bootable VMs (Ubuntu, Fedora, Windows 10 Preview). My Endless OS installation boots fine in legacy mode.

What do I have to do to tell Gnome-Boxes to start a particular machine using the UEFI/TianoCore/edk2 firmware? I already installed ovmf and also tried virt-manager where I have no problems importing and booting the VDIs with UEFI, but automatic screen resize does not work there and importing the virt-manager configured VMs into gnome-boxes still results in the latter trying to boot them as legacy. I spent a few hours yesterday testing all of this and only know very little about these programs and their components, the VirtualBox GUI and shell commands were good enough until now to get things done (I also tried building the latest trunk from SVN, no success).

I'm on xenial but could also test on zesty. I checked the changelogs of gnome-boxes and ovmf/edk2 too, but couldn't find anything related.

So if someone could help me get UEFI guests to boot in gnome-boxes, screen resize to work in virt-manager/viewer or an explanation why I can't have any of this at the moment I would very much appreciate that.

Regarding screen resize in virt-manager here is the configuration of the Ubuntu guest. xserver-xorg-video-qxl and spice-vdagent are installed the guest however still uses Gallium 0.4 llvmpipe, corresponding services (spice-vdagent(d)) are active in systemd but report spice-vdagentd[703]: Error getting session for pid 1992: No such device or address. Clipboard does not work. I can't get it to work following these instructions: https://www.linux-kvm.org/page/SPICE

$ virsh dumpxml ubuntu-zesty
<domain type='kvm' id='10'>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
    <type arch='x86_64' machine='pc-i440fx-xenial'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
    <boot dev='hd'/>
  <cpu mode='host-model'>
    <model fallback='allow'/>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='vdi'/>
      <source file='/media/livewire/Lionheart/virtmanager/images/Zesty-UEFI.vdi'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>
    <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 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 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 type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    <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'/>
    <serial type='pty'>
      <source path='/dev/pts/24'/>
      <target port='0'/>
      <alias name='serial0'/>
    <console type='pty' tty='/dev/pts/24'>
      <source path='/dev/pts/24'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    <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'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='spice' port='5900' autoport='yes' listen=''>
      <listen type='address' address=''/>
      <image compression='off'/>
    <sound model='ich9'>
      <alias name='sound0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
      <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'/>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir0'/>
    <redirdev bus='usb' type='spicevmc'>
      <alias name='redir1'/>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
  <seclabel type='dynamic' model='apparmor' relabel='yes'>

Screen resize in virt-manager & virt-viewer should work (in the guest OS), once you change the guest video card model to QXL, the display to Spice, and (in case of the Windows guest) install the QXLDOD driver from the virtio-win ISO.


"when using the QXL driver, the resolution of the guest OS will be automatically adjusted to the size of the client window."


"qxldod/: QXL graphics driver for Windows 8 and later. (build virtio-win-0.1.103-2 and later)"

  • Thanks, but it's not working yet. I have installed xserver-xorg-video-qxl and spice-vdagent in an Ubuntu Zesty guest, the latter one should enable resizing according to the package description. I also installed xserver-xspice since it appeared in my apt search qxl query. Virtmanager has this machine set to use spice for display everywhere (see my updated question). – LiveWireBT Jul 14 '17 at 5:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.