Error: Failed setting up device via monitor: Failed adding block device for disk device

Hello everybody,

when I create a custom block device on my default ZFS pool with
incus storage volume create incus myblockdevice --type=block size=400GB
and attach it with
incus storage volume attach incus myblockdevice win11vm
to my Win11 VM, the VM fails to start with the following strange error:

Error: Failed setting up device via monitor: Failed adding block device for disk device “myblockdevice”: Failed adding device: The serial number can’t be longer than 20 characters when it is also used as the default for device_id
Try incus info --show-log win11vm for more info

Other devices (local path from the hypervisor, seperate partition) show up just fine in the VM. What am I doing wrong? Can I set serial number or device_id somehow? Did not find anything about this.
Thanks for any pointers!
Christoph

What version of Incus? I thought we fixed that one already.

On recent Incus we use a hash for when the device ID would overflow.
We also now have a qemu.qmp.log file that logs all those interactions.

I was on 6.7 when reporting this, but 6.8 yields the same error.

Okay, I investigated things further. Seems to be some sort of corner case as the error is related to the name of the block device.
myblockdevice was just an example, which happens to work on 6.8 (and eventually worked on 6.7, I can’t test anymore).

When I use win11vm_my_blockdevice the error occurs.
See qemu.qmp.log https://pastebin.com/i0tCXDGB

Let me know if I can help to debug this further. Thanks a lot for this helpful community!

Hmm, okay, so I guess we need to weak/extend our logic then :slight_smile:

Can you file an issue at Issues · lxc/incus · GitHub?

Done. https://github.com/lxc/incus/issues/1536