Hello, newbie here!
I didn’t know about LXD/LXC until two weeks ago, and now I’m liking it a lot! I’ve got a new NUC13, where I installed Ubuntu 22.04 server. My purpose is to keep its installation as clean as possible (minimizing any extra installations), and have all my needs running in VM’s and/or containers on top of it - with LXD. So far so good, I’ve even managed to install a windows 11 VM on top of it - very happy!
I started out with the plan to have this NUC run headless in some corner, with no need to login physically on the console. Those VM’s and containers which contain a desktop installation, I’ve made them headless, so I can login remotely with a remote desktop client. No ssh tunneling etc needed. Appears to work great.
Now I came to think that sometimes I’d like to login physically on the console, and after console login start a VM (or container) with a desktop, and be able to use that VM desktop directly.
With that in mind, I found this guide and tried it:
After command
lxc launch images:ubuntu/22.04/desktop ubuntu --vm -c limits.cpu=4 -c limits.memory=4GiB --console=vga
I get an error saying “…gtk-warning … cannot open display” (there appears to be a time at the three dots). Same if I try later to
lxc console ... --type=vga
I’ve had both virt-manager and spice-client-gtk installed while trying to get the vga working, but no luck - same error. Even uninstalled virt-manager to make sure spice was in charge, but same error.
And as an afterthought, when I installed the win11 VM, I had the same problem - didn’t get the console=vga to work. At that time I was able to go aroung the problem by using lxc web gui’s console to finish the graphical parts. Now it is not a solution. But altogether, the console=vga has never worked on my installation, as far as I know.
So, any ideas, what am I doing wrong, what have I missed? I’ve got some lxc monitor --debug
output available, but it’s somewhat large with close to 6000 lines of output, it might have 2-3 attempts in it. If it would help, would you like it all or just some parts?
Finally, thank you already, LXD/LXC is a great product! I haven’t been very much into virtualization things before, but this has now inspired me a lot and opened my eyes to new possibilities.