Error while creating a windows11 vm

I’m getting this error when I try to ‘lxc config device add win11 vtpm tpm path=/dev/tpm0’ and I get ‘Error: Invalid devices: Device validation failed for “vtpm”: Failed loading device “vtpm”: Unsupported device type’
In the end in the virt-viewer I eventually get ’ Failed to start Boot0001 “UEFI QEMU DVD-ROM” Time out’ and the windows setup fails to showup.
Same error shows up when I tried with a windows 10.

Sounds like you’re on LXD 4.0?

That’s right. 4.0.9.

I have just upgraded my lxd to 5.4 but same ERROR:
‘Error: Invalid devices: Device validation failed for “vtpm”: Failed to validate config: Invalid device option “path”’
AT
‘lxc config device add win11 vtpm tpm path=/dev/tpm0’

Yep thats correct, you can see from the docs Instance configuration - LXD documentation that path is only for containers.

As LXD cannot control the device path for VMs, so you cannot specify it.

Okay I just started over. Removed distrobuilder and installed on --edge --classic and after running ‘sudo distrobuilder repack-windows Win11_EnglishInternational_x64v1.iso win11.lxd.iso’

I get

'INFO[2022-08-19T10:28:30Z] Mounting Windows ISO
mount: /var/cache/distrobuilder.3003805314/source: failed to setup loop device for Win11_EnglishInternational_x64v1.iso.
Error: Failed to mount “Win11_EnglishInternational_x64v1.iso” at “/var/cache/distrobuilder.3003805314/source”: exit status 32
INFO[2022-08-19T10:28:30Z] Removing cache directory ’

I’m not sure why you needed to start over.

lxc config device add win11 vtpm tpm

Would have been sufficient.

Anyway I’m not familiar with distrobuilder but @monstermunchkin maybe able to help.

Everything was successful now. But i’m getting this error

Got any assist on the screen/console error message I shared?

Can you show lxc config show <instance> --expanded, it looks like the boot order of the disk device is incorrect.

architecture: x86_64
config:
limits.cpu: “2”
limits.memory: 4GiB
volatile.cloud-init.instance-id: d914aebe-969d-4fee-895c-9edf60076eaf
volatile.eth0.hwaddr: 00:16:3e:ec:a3:39
volatile.last_state.power: STOPPED
volatile.uuid: a0bf87d9-cf2a-41f1-a840-3fa3a1a6bc2d
volatile.vsock_id: “6”
devices:
install:
boot.priority: “10”
source: /home/jesse/Downloads/ISOs/win10.lxd.iso
type: disk
root:
path: /
pool: default
size: 50GiB
type: disk
vtpm:
type: tpm
ephemeral: false
profiles:

  • default
    stateful: false
    description: “”

Hrm, maybe there’s an issue with the ISO.

@monstermunchkin have you experienced this?

The topic title says Windows 11, but this suggests Windows 10.

I run both installations. Just to confirm, but same error. Here’s win11’s;

architecture: x86_64
config:
limits.cpu: “2”
limits.memory: 4GiB
volatile.cloud-init.instance-id: f848903e-7626-40de-9e94-86610fdb57da
volatile.eth0.hwaddr: 00:16:3e:b9:4a:68
volatile.last_state.power: STOPPED
volatile.uuid: 9255fb1d-ceed-46b2-bac2-1da8887b704a
volatile.vsock_id: “5”
devices:
install:
boot.priority: “10”
source: /home/jesse/Downloads/ISOs/win11.lxd.iso
type: disk
root:
path: /
pool: default
size: 50GiB
type: disk
vtpm:
type: tpm
ephemeral: false
profiles:

  • default
    stateful: false
    description: “”

Your screenshots suggest that you didn’t press a key to boot from CD/DVD. This is necessary to actually install Windows.

1 Like

Started off nicely, then;
‘Error: websocket: close 1006 (abnormal closure): unexpected EOF’

Can you reconnect to the console?

Installing now. Looking good!

1 Like

Keeps disconnecting, unfortunately.

Done! Thanks