As of today, (LXD snap auto-updated yesterday to 4.4/stable) I can no longer start an lxd VM with vnc access using the method described here: Running virtual machines with LXD 4.0
qemu-system-x86_64: -vnc :1: VNC support is disabled: exit status 1
VNC support was dropped from the snap this week in favor of SPICE which weâve had supported natively by LXD for a little while now.
Weâve had both supported in parallel in the snap for a month or so but as LXD never officially supported VNC, it felt like a good idea to drop VNC from the snap, safe ourselves some build time, space and reduce the attack surface some more.
In your case, remove the custom -vnc :1 from your config and if you need to attach to the graphical console, use lxc console NAME --type=vga instead.
I see. Is there a way to have spice listen on an IP socket instead of the default UNIX socket? Otherwise, Iâd need to use ssh X forwarding for virt-viewer. Iâm trying to get through the Windows installer.
I have both remote-viewer and spicy installed, but I keep getting the below error. Do I need to configure paths to these binaries?
LXD automatically uses either spicy or remote-viewer when present.
As neither could be found, the raw SPICE socket can be found at:
/home/shaner/......etc
Also, Iâm hoping I can beat the clock to the UEFI boot menu this way.
LXD does quite a bit of magic to have this part work with the snap.
If youâve never used your local LXD, you need to have it start so that this logic can run, lxc list should do the trick.
If you do have your local LXD running already but installed spicy/remote-viewer after it started, then you may need to reload it with sudo systemctl reload snap.lxd.daemon
Alternatively, you can directly provide the path the command line gives you to your client of choice using spice+unix://<path> as the URI.
Hi all. Trying to get it working on macOS Mojave because previously I relied on VNC to remotely setup windows virtual machines on LXD.
I installed the LXD client on MacOS with Homebrew, and I can connect to the remote daemon and manage the virtual machines (I had to open port 8443 for LXD daemon). lxc list works.
When opening a graphical console on macOS, I get a warning that spicy or remote-viewer are not present and gives me the local socket URL.
$ lxc console wintest --type=vga
LXD automatically uses either spicy or remote-viewer when present.
As neither could be found, the raw SPICE socket can be found at:
spice+unix:///Users/j/.config/lxc/sockets/171832498.spice
Using that URL on the bundle of RemoteViewer displays an error of âUnable to connect to the graphic server spice+unix://âŠâ
Is this error about not being able to connect to the remote LXD daemon? Is it because it cannot access the socket file? Or is it because it cannot find any kind of local graphic server on the macOS?
Yes, I used the Homebrew version. I got RemoteViewer from https://www.spice-space.org/osx-client.html , where it says âA bundle is now availableâ, downloading version 0.5.7-1 of the application, which is called Virtual Machine Viewer.
I tried connecting with nc -U to the local socket file, and it seems it can connect OK, because when I canceled the nc command with CTRL+C or typed whatever text on the nc console and exitted, the âlxc consoleâ command exitted and removed the socket.
So, I guess it can be a problem with the graphical client. What options do I have to connect from MacOS? Iâll try to contact the spice space developers as well.
Ok, so I can confirm the following setup works on MacOS Mojave to try to connect to a remote LXD on Ubuntu Focal Fossa (20.04). Iâm just showing the commands from the MacOS.
LXC installed via Homebrew on MacOS $ brew install lxc
Checked that remote access works $ lxc remote add ... $ lxc list
Installed virt-viewer via Homebrew from the jeffreywildman repo ( https://rizvir.com/articles/ovirt-mac-console/ ) $ brew tap jeffreywildman/homebrew-virt-manager $ brew install virt-viewer
Now, although a previous lxc console command said âLXD automatically uses either spicy or remote-viewer when present.â, it works with the installed virt-viewer.
$ lxc console wintest --type=vga
Just make sure you remove any VNC or Spice parameters on the raw.qemu config from the virtual machine before launching the VM.