This is in contrast to virtio-scsi devices for which it is:
# no serial - businfo based ID_SERIAL and ID_SERIAL_SHORT are generated automatically
ubuntu@maas-vhost6:~$ udevadm info --query=property --name /dev/sda | grep ID_SERIAL
ID_SERIAL=0QEMU_QEMU_HARDDISK_drive-scsi0-0-0-0
ID_SERIAL_SHORT=drive-scsi0-0-0-0
# has serial - ID_SERIAL and ID_SERIAL_SHORT are used based on the serial provided to qemu via libvirt
ubuntu@maas-vhost6:~$ udevadm info --query=property --name /dev/sdb | grep ID_SERIAL
ID_SERIAL=0QEMU_QEMU_HARDDISK_disk0
ID_SERIAL_SHORT=disk0
For a virtio-blk device without a serial specified in domain xml, ID_SERIAL is not auto-generated based on businfo:
udevadm info --query=property --name /dev/vda /dev/disk/ by-path/ pci-0000: 06:00.0 /dev/disk/ by-path/ virtio- pci-0000: 06:00.0 /devices/ pci0000: 00/0000: 00:02.5/ 0000:06: 00.0/virtio5/ block/vda pci-0000: 06:00.0 TAG=pci- 0000_06_ 00_0 D=69719445
DEVLINKS=
DEVNAME=/dev/vda
DEVPATH=
DEVTYPE=disk
ID_PATH=
ID_PATH_
MAJOR=252
MINOR=0
SUBSYSTEM=block
TAGS=:systemd:
USEC_INITIALIZE
This is in contrast to virtio-scsi devices for which it is:
# no serial - businfo based ID_SERIAL and ID_SERIAL_SHORT are generated automatically maas-vhost6: ~$ udevadm info --query=property --name /dev/sda | grep ID_SERIAL 0QEMU_QEMU_ HARDDISK_ drive-scsi0- 0-0-0 SHORT=drive- scsi0-0- 0-0
ubuntu@
ID_SERIAL=
ID_SERIAL_
<disk type='file' device='disk'> mnt/sec1/ libvirt- images/ vhost6. qcow2'/ >
<driver name='qemu' type='qcow2'/>
<source file='/
<target dev='sda' bus='scsi'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
# has serial - ID_SERIAL and ID_SERIAL_SHORT are used based on the serial provided to qemu via libvirt maas-vhost6: ~$ udevadm info --query=property --name /dev/sdb | grep ID_SERIAL 0QEMU_QEMU_ HARDDISK_ disk0 SHORT=disk0
ubuntu@
ID_SERIAL=
ID_SERIAL_
<disk type='file' device='disk'> mnt/sec1/ libvirt- images/ maas-vhost6. qcow2'/ > serial> disk0</ serial>
<driver name='qemu' type='qcow2'/>
<source file='/
<target dev='sdb' bus='scsi'/>
<
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>