Dynamic Resolution under KVM/Libvirt


So a while ago I installed Ubuntu 18.04 Desktop in a KVM virtual machine on a server, using LibVirt / Virt-Manager.

One of the features I noticed (admittedly after some fiddling) was Ubuntu would update the desktop resolution after I resized the SPICE window. [see Figure 1.]

Figure 1. - Well that’s not a standard Resolution

All was good in the world for a while and using SPICE at high resolutions over a 10GBe network is actually close to native in it’s experience.

However one of the main reasons I use virtualization is that I need to test software under a variety of distributions. So when I came to install ANY other distro (that I have tried) I found the feature to set the resolution dynamically missing [see figure 2.]

Figure 2. - The option for a weird resolution isn’t there :frowning:

So does anyone know what software or configs Ubuntu is using to talk to the virtio video driver and set the dynamic resolution, so I can install it in other distros. It is a real quality of life improvement when working with virtual desktops (and if anyone knows how to do it for Windows I would be eternally grateful)?

  • Segfault

TLDR for future readers:

  1. install spice-vdagent
  2. systemctl enable spice-vdagent.service
  3. ensure that a spice channel is installed in the VM
  4. reboot
  5. Profit!
1 Like

How long do I have to wait before bumping this?

So the software is called QEMU guest additions. The package name will vary by distro, so you’ll have to search.

Typically, we wait to bump for a few days, but it’s not a big deal.

Many thanks

Oh, sorry, next time XD

1 Like

There isn’t really a set rule on this, more just forum decorum.

Lots of people are watching the category or tags you used, so there are a bunch of people who got notified about it. (me included)

I just didn’t have a chance to respond yesterday for a variety of reasons.



QEMU guest additions for windows is included with the windows virtio drivers.

Source code-

Signed binaries(very important for quality of life with windows)-

Yes, but we’re talking about Linux VMs, from what I can see.

I was replying to this-

1 Like

thanks so far I am having more luck with windows than kali XD

Meanwhile on kali I have installed and enabled qemu-guest-agent (closest match) and spice-vdagent

It feels a little snappier but still no dynamic resolutions :frowning: and qemu-guest-agent exits with this error:

Kali GNU/Linux Rolling kali ttyS0

kali login: user
Last login: Mon Jan 21 00:38:32 GMT 2019 on ttyS0
Linux kali 4.17.0-kali1-amd64 #1 SMP Debian 4.17.8-1kali1 (2018-07-24) x86_64

The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
 Welcome to Terminal Simulator 2019 
[21:24 user@kali ~]$ sudo systemctl status qemu-guest-agent.service 
[sudo] password for user: 
● qemu-guest-agent.service - LSB: QEMU Guest Agent startup script
   Loaded: loaded (/etc/init.d/qemu-guest-agent; generated)
   Active: active (exited) since Mon 2019-01-21 21:17:37 GMT; 7min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 837 ExecStart=/etc/init.d/qemu-guest-agent start (code=exited, status

Jan 21 21:17:37 kali systemd[1]: Starting LSB: QEMU Guest Agent startup script..
Jan 21 21:17:37 kali qemu-guest-agent[837]: qemu-ga: transport endpoint not foun
Jan 21 21:17:37 kali systemd[1]: Started LSB: QEMU Guest Agent startup script.
lines 1-9/9 (END)

Thank goodness for serial consoles or getting that snippet would have been a pain.

OK I got kali working \o/

#TLDR for future readers:

  1. install spice-vdagent
  2. systemctl enable spice-vdagent.service
  3. ensure that a spice channel is installed in the VM
  4. reboot
  5. Profit!

OK I got windows working too now

The trick for this one was to install the spice-guest-tools installer for windows from


Make sure you grab the binary not the source.

Next you’re gonna need to make sure that a spice channel is installed and your graphics adapter is set to QXL. (I haven’t tested with the virtio windows drivers but I am aware they exist)

Finally SHUT DOWN your VM. (A reboot didn’t cut it for some reason) Then power it back on. It should now have dynamic resolution and a much snappier experience. the guest-agent-tools package actually includes the QXLDoD drivers so everything should “just work™”