VM on Headless Unbuntu Server - Connecting Windows Spice Client for VGA Console

Ubuntu 20.04
lxd 4.23

After running a VM on my headless ubuntu 20.04 server, I am unable to establish a spice vga console connection on my windows workstation. Using the LXD tutorial that creates a Windows 11 VM, I have created an empty virtual machine, which is now running an iso image file.


  1. Using the --console=vga command, I received a warning message that LXD relies on either remote-viewer or Spicy to provide VGA access. Do I need to remote-viewer on the server or only the client (windows 10)?

  2. On the windows virtviewer client, I used the address spice://, which is the local address to the created VM as stated by lxd. Should there be more to the address?

The tutorials I run across either is for a proxmox server or the client is also the server machine. I am hoping to find one specifically for a windows client attaching to a headless linux server.


SPICE with LXD is run over the LXD API, it is not available on a separate per-VM port or similar unsecure socket.

For setup like yours, what you should do is configure LXD to listen on the network (lxc config set core.https_address :8443), create a trust token (lxc config trust add --name your-client) and then on a desktop system, do lxc remote add your-server TOKEN to add the remote server to it.

With that done, you can do lxc remote switch your-server so all operations from that remote client are run against your server, run lxc list to confirm it’s all good and then you can run lxc console --type vga your-vm and you’ll get remote-viewer on your desktop system showing you the remote VM on your server.