[SOLVED] The serial number can't be longer than 20 characters

karypid

Active Member
Mar 7, 2021
32
9
28
47
Hello,

After a recent update, I am no longer to start a VM. I get this error:

Code:
root@lab:~# qm start 9003
kvm: -device scsi-hd,bus=virtioscsi1.0,channel=0,scsi-id=0,lun=1,drive=drive-scsi1,id=scsi1,serial=WDC_WDxxxxxxxx-xxxxxxxxxxxxxxxx: The serial number can't be longer than 20 characters when it is also used as the default for device_id
start failed: QEMU exited with code 1

The serial number of the disk attached to the VM is indeed more than 20 chars. Not sure what I can do to fix this...
 
I anyone comes across this, apparently there is now a limit to the number of characters to the serial number.

I had attached the disks as:

Code:
dev=/dev/disk/by-id/....
qm set 9003 -scsi1 ${dev},serial=$(lsblk -nd -o model,serial ${dev} | tr ' ' '_'),backup=0

Concatenating the model and the serial is too much, therefore I updated the VM with the serial only:

Code:
qm set 9003 -scsi1 ${dev},serial=$(lsblk -nd -o serial ${dev} | tr ' ' '_'),backup=0

After this I was able to start the VM...
 
  • Like
Reactions: leesteken