[Howto] GUI in Virtual Machines/VMs

Since LXD 4.4., a VGA console is implemented in all LXD VMs.
Use the official images with the cloud tag.

To access the Graphical console of a Virtual machine, follow the instructions below:

On Linux:
Note: Package names might be different on certain distributions.

  1. Install virt-viewer (remote-viewer) or spice-gtk-client (spicy) on your client system.
  2. Login in with: lxc console --type=VGA

On Windows:

  1. Install virt-viewer via Chocolatey or the manual installer.
  2. Login in with: lxc console --type=VGA

On MacOS:

  1. Install spice-gtk (or remote-viewer) via Homebrew on your client system.
  2. Login in with: lxc console --type=VGA

Sources:
https://discuss.linuxcontainers.org/t/lxd-4-5-has-been-released/8824
https://discuss.linuxcontainers.org/t/lxd-4-4-has-been-released/8574

@stgraber @tomp Could you put this into the tutorials section?

These are the same instructions given by stgraber, only a bit easier to find :slight_smile:.

2 Likes

Is this possible on mac?

@stgraber

I assume that spice is also available on MacOS?
Update: Seems only an experimental client is available: https://www.spice-space.org/osx-client.html

@stgraber

Additional question:
I just noticed that I can’t seem to find a software named spicy anywhere, is that the correct name?
I copied the info from your post here:

stgraber@castiana:~$ which spicy
/usr/bin/spicy
stgraber@castiana:~$ dpkg -S /usr/bin/spicy
spice-client-gtk: /usr/bin/spicy

Thank you.
Should have thought about that; should I rename it “spice-client” or “spice-gtk-client” instead?
It seems that this is the package name, in different variaties, on most distros?

@stgraber
Does that client work with LXD on MacOS?

And what about the spice-html5 application?
Should we mention that as well?

Maybe worth mentioning it as spice-gtk-client (spicy) so people can check both by package name and by command name.

I believe we’ve have someone successfully using remote-viewer on macOS through some homebrew package, I don’t know if spicy is available on there too though.

spice-html5 works fine with LXD but it’s quite involved as you effectively need to go modifying the example html to point to the right LXD operation. It’s fine for someone who’s writing their web client like @turtle0x1 but probably not something we’d want an end user to attempt

1 Like

Thx. Edited it.

I only found spice-gtk (https://formulae.brew.sh/formula/spice-gtk), but no remote-viewer or virt-viewer :thinking:.

Should I mention @turtle0x1’s web client (I assume it’s “LXD Mosaic”) as unofficial/third-party software ?