Linux – Do I need both the QEMU Agent and SPICE Agent installed in Windows 10 guest

linux-kvmqemuvirtualization

I have a Windows 10 VM set up on my Ubuntu 16.04.3 LTS laptop. Overall the experience has been good — even to the point of having multiple displays configured for the guest.

I started by installed the QEMU Guest Agent found here:

This got me fairly far, but things like mouse performance were abysmal.

Eventually came across this wonderful package, and it made everything work much better:

Things are CONSIDERABLY BETTER with this agent, including dynamic screen resize, clipboard between guest/host, etc.

As it stands right now, I have both installed. However, it looked like the "spice-guest-tools" installed most of the same drivers that I did manually with the QEMU guest ISO.

Is it safe to remove the QEMU Guest Agent? Will I lose the ability to send commands to the VM via virsh if I do? Any explicit problems with leaving both intact (it all seems to be working fine right now)?

Looking through the manual didn't seem to give a ton of guidance:

At best, it was wishy washy, depending on how you installed other drivers.

Can the "spice-guest-tools" installation stand alone on a Windows guest, or do I need both agents for full functionality?

Best Answer

The QEMU Guest Agent (qemu-ga) and the SPICE agent are both needed for different purposes.

"QEMU Guest Agent" is one specific component of the 'virtio-win' set of drivers offered by RedHat. For a list of all components, check https://docs.fedoraproject.org/quick-docs/en-US/creating-windows-virtual-machines-using-virtio-drivers.html#virtio-win-iso-contents. These components are not installed all at once as part of a package; instead, the user is expected to manually install what is needed for his particular case.

This is different from the SPICE agent: according to the download page you linked (https://www.spice-space.org/download.html) and also the source repository (https://gitlab.com/spice/spice-nsis), this one includes the qxl video driver and the vioserial (VirtIO serial driver). The latter is a dependency, as the agent communicates with the host through a VirtIO serial channel. The former may be just convenience, or may be needed for automatic resolution switching - I don't know for sure.

So, even though the 'SPICE guest tools' installer for Windows includes some of the virtualization drivers for Windows offered by RedHat, the qemu guest agent itself is not part of the package, and is also not related.

Once installed, it runs as a Windows service (you can find it in services.msc) and should start automatically. It enables better integration between guest and the hypervisor through a virtio-serial channel (like SPICE) but for management purposes.

To understand how, check these references from the Red Hat Virtualization Deployment and Administration Guide:

(I used to think that qemu-ga was a requirement for the balloon driver to work; looks like I was wrong, though).

Related Question