I am trying to launch a windows VM on a debian remote host.
I have done all the steps ( prepared windows iso file and created the VM)
I can’t connect to the remote VGA console to access the Windows install wizard.
could anyone help me to connect the VM from my local windows machine?
When you run incus start mywin11vm --console=vga, you get this process list (output of pstree). Incus launches remote-viewer with some parameters not shown yet.
Is there something that you can do if the Windows VM is on a remote Incus host? There are several things you can do and I am not sure what’s the best option.
let me detail my current scenario. when I try to get the console access, I am having the following
#incus console windows2019std --type=vga
The client automatically uses either spicy or remote-viewer when present.
As neither could be found, the raw SPICE socket can be found at:
spice+unix:///root/.config/incus/sockets/3419451436.spice
I also try to access the console after install spice-client-gtk, then I am getting the below error
# incus console windows2019std --type=vga
(process:899839): Gtk-WARNING **: 08:06:02.241: Locale not supported by C library.
Using the fallback 'C' locale.
(spicy:899839): Gtk-WARNING **: 08:06:02.242: cannot open display:
I can see a # there. You are running these as root. For CLI commands this is OK but for UI apps, it gets tricky.
Use a non-root account to run incus commands.
Your non-root account should be a member of the incus-admin group, and by doing so, you can run all incus commands.
If myusername is your non-root account, then add it to the incus-admin group with
usermod -a -G incus-admin myusername
Then logout and login again.
You will be able now to run incus console without being root.
I haven’t encountered any issues while running the incus commands as root.
However, I’m currently unable to connect to the VGA console remotely.
Is there any way to use the VGA console remotely (over ssh ?) or with VNC on my computer?
Install the Incus client for Windows and install remote-viewer for Windows.
Then you can connect to your remote Incus server directly from your Windows machine including accessing the VGA console.
Is it possible to run windows powershell commands on windows VM from the host machine?
I have tried configure openssh server on windows and able to execute commands
but I need something like as did for CTs incus exec test -- mkdir new_dir
When you run commands like incus exec to a virtual machine (compared to a container), the virtual machine needs to have inside a special Incus auxiliary program (the agent) that responds to those incus exec, etc commands.
When the Incus VM runs a version of a Linux distribution, then Incus manages to add that Incus auxiliary program (the agent) automatically for you.
Currently, there is no such agent yet for Incus VMs that run Windows.
You would need something else now to get access to the Windows VM, such as installing an SSH server in there.
Right, we’re actually hoping to eventually have the agent run on Windows.
It’s been designed in a way to make this possible, but there are still some missing device drivers on Windows to make this possible.
Our agent basically relies on 9p/virtiofs (which is supported on Windows), virtio-serial (which I believe is supported too) and virtio-vsock (which has a driver but not shipped in the signed virtio drivers yet).
So we’re mostly blocked on vsock and then will need to make sure that we can actually get all 3 of them working together correctly.
Hello @stgraber Is there any way to assign static ip to a windows VM directly from the debian host machine? currently I am doing this by logged into the VM using remote viewer
Not a truly static address as there’s no cloud-init or similar for our Windows VMs.
But you can always use DHCP and set a static lease using ipv4.address on the nic device.
Naturally Stephane’s response is a lot easier and more logical.
Alternatively you could look into cloudbase-init for Windows VMs which can consume cidata from a virtual CDROM. I use it to:
create a service account for Ansible (user & pass strings 19 chars max)
enable WinRM with TLS
set the time-zone
set the hostname the same name as the Incus instance name so that Ansible can find the VM on the network and do the rest… you’d also need DDNS updates for this.
At the mo the cloud-init stuff goes in an Incus Profile that gets assigned to the VM during the creation process, but that all needs to belong in Terraform and the secure stuff in vaults. The Windows VM image is syspreped.
I use the ssh local forward to solve this problem.
eg:
`
incus server
incus start win --console=vga
local(mac or linux)
ssh -L 127.0.0.1:6789:/home//.config/incus/sockets/.spice
`
If you are using a Windows machine, run the ssh command at incus server to convert the socket to a TCP port and try to connect it.