Incus vtpm issue when trying to start a new Win11 VM on Ubuntu 24.04

I set up a Win11 VM through incus based off THIS ARTICLE. When I try to do incus start Win11-01 --console=vga I get the following error:

➜ incus start Win11-01 --console=vga
Error: Failed to run: forklimits limit=memlock:unlimited:unlimited fd=3 fd=4 -- /usr/bin/qemu-system-x86_64 -S -name Win11-01 -uuid 1205bc91-0291-43e4-b34e-ca2acf1dd8fe -daemonize -cpu host,hv_passthrough -nographic -serial chardev:console -nodefaults -no-user-config -sandbox on,obsolete=deny,elevateprivileges=allow,spawn=allow,resourcecontrol=deny -readconfig /run/incus/Win11-01/qemu.conf -spice unix=on,disable-ticketing=on,addr=/run/incus/Win11-01/qemu.spice -pidfile /run/incus/Win11-01/qemu.pid -D /var/log/incus/Win11-01/qemu.log -smbios type=2,manufacturer=LinuxContainers,product=Incus -runas nobody -device intel-hda -device hda-duplex -audio spice: : exit status 1
Try `incus info --show-log Win11-01` for more info

And

➜ incus info --show-log Win11-01    
Name: Win11-01
Status: STOPPED
Type: virtual-machine
Architecture: x86_64
Created: 2024/05/31 08:02 MDT
Last Used: 1969/12/31 17:00 MST

Log:

qemu-system-x86_64:/run/incus/Win11-01/qemu.conf:247: Failed to connect to '/var/lib/incus/virtual-machines/Win11-01/tpm.vtpm/swtpm-vtpm.sock': No such file or directory

I have installed

➜ sudo apt list --installed | grep -e swtpm -e incus

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

incus-agent/noble,now 6.0.0-1 amd64 [installed,automatic]
incus-client/noble,now 6.0.0-1 amd64 [installed,automatic]
incus/noble,now 6.0.0-1 amd64 [installed]
libtss2-tcti-swtpm0t64/noble-updates,noble-security,now 4.0.1-7.1ubuntu5.1 amd64 [installed,automatic]
swtpm-tools/noble,now 0.7.3-0ubuntu5 amd64 [installed]
swtpm/noble,now 0.7.3-0ubuntu5 amd64 [installed]

I cannot find any references for swtpm in the docs, nor can I find any instructions yet for how to use swtpm.

Reading THIS ARTICLE, I see there is are other deps needed for VMs on Incus in Ubuntu-24.04. What are these deps?

Thanks

Definitely sounds like some issue with getting swtpm up and running.

I don’t know if @gibmat got to test the swtpm interaction with the incus Debian packages, maybe there’s an issue there either on our end or in the way swtpm is packaged in Debian/Ubuntu.

A quick fix would be to switch to GitHub - zabbly/incus: Incus package repository, using the lts-6.0 repo to get the same version you’re currently running but using those larger self-contained packages which will bring in swtpm in a way that’s known to work.

@stgraber thanks for a quick response. I was avoiding using the 3rd party repo, but since its your recommendation I will. Before I do I want to try to do a full restart of my system and try again.

I will update here on what happens. I also have another desktop computer that I can use to test out the official Debian/Ubuntu (running 24.04 RN), if the offical maintainers want me to provide any debugging info and instructions I can.

Again, Thank you so much @stgraber! the repo worked! installing Windows now. Let me know if I can help debug the official Debian/Ubuntu builds in the repo. I can set a computer aside to assist.