Red Hat Bugzilla – Bug 901493
[TestOnly] No ID_SERIAL for virtio-blk devices
Last modified: 2013-01-22 21:16:38 EST
Description of problem:
Virtio-blk devices does not have ID_SERIAL and no way to uniquely identify virtual devices under guest OS. I tried to add <serial>SERIAL_ID</serial>
to existing virtio-blk devices using virsh command. I tried this command
on active and inactive guest but it is failing with different errors.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. setup a guest using virtio-blk disk, without giving a serial id to
the disk, this is the default situation.
2. In guest, run `udevadm info /dev/vda | grep ID_SERIAL`, it returns empty.
3. Create an XML file to update a specific device. To add a line for the
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<target dev='vdb' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00'
4. add serialID by updating the device with the help of below command:
$ virsh update-device <GuestName> guest-device.xml
1. Step2 o/p is null.
2. Step4 o/p is as below.
error: Failed to update device from t.xml
error: unsupported configuration: disk bus 'virtio' cannot be updated.
All virtio-blk devices should have ID_SERIAL.
Qemu-kvm did not support serial property for virtio_blk device before qemu-kvm-0.12.1.2-2.350.el6, you could check it by '/usr/libexec/qemu-kvm -device virtio-blk-pci,?'.
But it support later than qemu-kvm-0.12.1.2-2.350.el6. BTW, there are two ways to specify the serial number for virtio_blk device, e.g: -drive serial=xxxxx,.... and ....-device virtio-blk-pci serial=xxxxx.
note: the serial ws limited to 20 charachters.
and we can check serial number in guest.
- Linux guest.
# cat /sys/block/vdX/serial
- Windows guest.
] hddsn.exe YYY ----> YYY is the disk you want to check.
The feature was introduced by 0458d1ca16af0a6903e3409634bcd3cb5d445ca6, necessary for Bug 877836 (VERIFIED) and backported by Stefan. It'll be part of RHEL6.4.
Reassigning, marking it TestOnly and status:ON_QA.
Base on comment #2 and comment #3, disk serial numbers are supported later than qemu-kvm-0.12.1.2-2.350.el6, it'll be part of RHEL6.4, and i also tried latest qemu-kvm-0.12.1.2-2.352.el6, it works well. Close this issue as duplicated to bug 877836, free to correct me if any mistake.
*** This bug has been marked as a duplicate of bug 877836 ***