Bug 499664 - inconsistency between reported device names / guest device names in virt-manager
inconsistency between reported device names / guest device names in virt-manager
Product: Fedora
Classification: Fedora
Component: virt-manager (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Cole Robinson
Fedora Extras Quality Assurance
Depends On:
Blocks: F11VirtTarget
  Show dependency treegraph
Reported: 2009-05-07 11:20 EDT by Marcelo Tosatti
Modified: 2009-12-03 18:56 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-12-03 18:56:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
guest console (81.65 KB, image/png)
2009-05-07 11:56 EDT, Marcelo Tosatti
no flags Details
virt-manager interface (41.78 KB, image/png)
2009-05-07 11:57 EDT, Marcelo Tosatti
no flags Details

  None (edit)
Description Marcelo Tosatti 2009-05-07 11:20:25 EDT
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 
numbering scheme.

Version-Release number of selected component (if applicable):

Fedora 11 Preview

How reproducible:


Steps to Reproduce:
1. hot add block devices
2. hot remove block devices
Actual results:

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". 

Expected results:

Additional info:

Perhaps a different namespace for virt-manager, eg using numbers instead of letters to enumerate the devices, so:

- vd1
- vd2
- vd3

Would avoid confusion? Not sure how important this is though, however seemed
worth a bugzilla entry.
Comment 1 Mark McLoughlin 2009-05-07 11:35:09 EDT
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?
Comment 2 Marcelo Tosatti 2009-05-07 11:55:57 EDT
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).
Comment 3 Marcelo Tosatti 2009-05-07 11:56:35 EDT
Created attachment 342863 [details]
guest console
Comment 4 Marcelo Tosatti 2009-05-07 11:57:11 EDT
Created attachment 342864 [details]
virt-manager interface
Comment 5 Marcelo Tosatti 2009-05-07 11:59:12 EDT
Doh, ignore the screenshots, the "Connect" button works as expected and you see the CDROM image. The original bug report still holds though.
Comment 6 Daniel Berrange 2009-05-07 11:59:37 EDT
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
Comment 7 Bug Zapper 2009-06-09 11:21:50 EDT
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:
Comment 8 Cole Robinson 2009-12-01 22:01:50 EST
Fixed upstream, I went with Dan's recommended naming scheme:

Comment 9 Cole Robinson 2009-12-03 18:56:09 EST
Not really critical to backport to F11 IMO, but this should now be in rawhide with virt-manager-0.8.1, so closing.

Note You need to log in before you can comment on or make changes to this bug.