How to create a Windows VM on a host without any graphical interface


I’m trying to start a Windows VM on a remote host (using Debian 11 and LXD 5.0).

This host is a remote dedicated server and has no graphical interface at all, so I can’t use the VGA console to access the Windows install wizard.

Is it possible to use the VGA console remotely (over ssh ?), with spicy on my computer for example ?

Or is there a solution to install Windows without GUI ?

Thank you

With lxc start win --console=vga you will get a remote graphical console. There is a nice video walking you through the full process of installing Windows on a LXD VM: Windows 11 VM on LXD - YouTube

1 Like

Thank you for your message.

Unfortunately, this commands doesn’t work from the host (as it has no graphical interface I guess) :

~# lxc console wintest --type=vga
Unable to init server: Could not connect: Connection refused

(spicy:164080): Gtk-WARNING **: 20:12:11.591: cannot open display:

The # seems to indicate a root shell which could explain why there is no graphical session?

You said the server is remote so you should be able to run the following from your own machine and user:

$ lxc console $rmt:wintest --type=vga

This requires $rmt to be a valid remote in the lxc remote sense of it.

1 Like