Running lxc exec for a Windows instances

I am trying to run some headless command via lxc exec for a windows instances. The window VM has auto login enabled.

Currently the container is running and logged in, I can validate via the visual console (type=vga). However when I try to run lxc exec win11 -- cmd.exe ver I get the error below, keep in mind the instance is running.

Error: LXD VM agent isn't currently running

How would I run something else in a window container?

There’s no agent software that gets added into the Windows VM. The exec works on Linux instances because there’s an agent that gets auto-added in there. This addition happens behind the scenes.

If you want to run processes on Windows, you would use some other service like SSHD. The default prepared ISO image does not add such a service, which means that you would need to add manually (or work with distrobuilder to add such support).

How did you add this post into the LXD category? It does not work for me.

Thanks for the information, I’ll give it a shot.

How did you add this post into the LXD category? It does not work for me.

Umm I am not sure, I do not remember choosing that category

I’m the one who’s basically moving all posts mentioned LXD over to the LXD category.