Problem starting Win10 VM - spice disabled

I am trying to run a Windows 10 image on Alpine 3.15 using PCI passthrough. However, at the moment I am stumped because it seems spice is disabled, which in and of itself isn’t the end of the world, I don’t need the graphical client. Even so, I don’t understand how to tweak the parameters sent to qemu when starting the VM? I understand there is raw.qemu to add extra parameters, but how do I remove or tweak the ones already there? Or am I barking up the wrong end of the tree here?

This is the current result when I try to start the VM:

# lxc start win10

Error: Failed to run: forklimits limit=memlock:unlimited:unlimited -- /usr/bin/qemu-system-x86_64 -S -name win10 -uuid 6de5f776-381c-46cc-95ad-a4c737c8b60f -daemonize -cpu host -nographic -serial chardev:console -nodefaults -no-user-config -sandbox on,obsolete=deny,elevateprivileges=allow,spawn=deny,resourcecontrol=deny -readconfig /var/log/lxd/win10/qemu.conf -spice unix=on,disable-ticketing=on,addr=/var/log/lxd/win10/qemu.spice -pidfile /var/log/lxd/win10/qemu.pid -D /var/log/lxd/win10/qemu.log -smbios type=2,manufacturer=Canonical Ltd.,product=LXD -runas nobody: qemu-system-x86_64: -spice unix=on,disable-ticketing=on,addr=/var/log/lxd/win10/qemu.spice: spice support is disabled

: Process exited with non-zero value 1

Try `lxc info --show-log win10` for more info

Ah yeah, we require SPICE to be supported in the QEMU build.
Not only for the remote display feature but also because we support it for remote USB and file sharing.

Any chance you can have your distro turn it on in their QEMU build?

I will certainly ask, but either way, I should be able to package it on my own. Thanks for letting me know it’s a requirement!

I noticed that -nographic is also included in the switches sent, is there something else I need to do (I added the gpu to the VM) to get it to use the graphics card as the display?

I don’t think so. The firmware is unlikely to have the driver needed for the physical GPU so will most likely use the built-in virtio-gpu output and SPICE, but once the OS is booted, you should effectively see a dual-monitor setup with one being SPICE and the other your physical GPU output and can just turn off the built-in one.

Turns out alpine has 4 spice addition packages, of which I only found two. If anyone else with the same problem finds this thread, search pkgs.alpinelinux.org for qemu-*spice* to find all four.