Red Hat Bugzilla – Bug 499664
inconsistency between reported device names / guest device names in virt-manager
Last modified: 2009-12-03 18:56:09 EST
Description of problem:
Its somewhat misleading that the names reported in virt-manager do not
necessarily match the device names in the guest, while they use similar
Version-Release number of selected component (if applicable):
Fedora 11 Preview
Steps to Reproduce:
1. hot add block devices
2. hot remove block devices
The guest is free to assign different device names than those reported in
virt-manager, for example:
guest contains /dev/vda, /dev/vda1, and /dev/vdr, while virt-manager names the second disk "vdb".
Perhaps a different namespace for virt-manager, eg using numbers instead of letters to enumerate the devices, so:
Would avoid confusion? Not sure how important this is though, however seemed
worth a bugzilla entry.
Why does the guest name it /dev/vda1 instead of /dev/vdab?
Could you give a specific example of how they would not match? I can't reproduce here?
When you hot-remove virtio-blk, for some (unknown to me) reason udev continues to number new devices not taking removals into account. Example:
1) hot-add virtio-blk device, shows up as vdb
2) hot-remove vdb
3) hot-add virtio-blk device, shows up as vdc in guest, vdb in virt-manager
Also, there is some inconsistency for CDROMs: if you start a guest with a CDROM attached, the CDROM image is not accessible (see attached screenshots).
Created attachment 342863 [details]
Created attachment 342864 [details]
Doh, ignore the screenshots, the "Connect" button works as expected and you see the CDROM image. The original bug report still holds though.
Regardless of why the guest choose to give wierd names, I agree that its not very useful for virt-manager to display these names. For a start the guest could be Windows + VirtIO PV drivers, so a name 'vda' is meaningless for that. Also Linux likes to call IDE disks sda these days, instead of hda
Ultimately the disk names that libvirt exposes are only really useful as an sort ordering property.
Thus, instead of hda, sda, vda, etc, virt-manager should display a name made from a combo of bus name, disk type & disk number, eg
IDE disk 1
IDE cdrom 2
IDE disk 3
VirtIO disk 3
Xen disk 3
SCSI disk 2
USB disk 3
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.
More information and reason for this action is here:
Fixed upstream, I went with Dan's recommended naming scheme:
Not really critical to backport to F11 IMO, but this should now be in rawhide with virt-manager-0.8.1, so closing.