Bug 499664 - inconsistency between reported device names / guest device names in virt-manager
Summary: inconsistency between reported device names / guest device names in virt-manager
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F11VirtTarget
TreeView+ depends on / blocked
 
Reported: 2009-05-07 15:20 UTC by Marcelo Tosatti
Modified: 2009-12-03 23:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-03 23:56:09 UTC
Type: ---
Embargoed:


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

Description Marcelo Tosatti 2009-05-07 15:20:25 UTC
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:

Always

Steps to Reproduce:
1. hot add block devices
2. hot remove block devices
3. 
  
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 15:35:09 UTC
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 15:55:57 UTC
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 15:56:35 UTC
Created attachment 342863 [details]
guest console

Comment 4 Marcelo Tosatti 2009-05-07 15:57:11 UTC
Created attachment 342864 [details]
virt-manager interface

Comment 5 Marcelo Tosatti 2009-05-07 15:59:12 UTC
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 Berrangé 2009-05-07 15:59:37 UTC
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
 etc

Comment 7 Bug Zapper 2009-06-09 15:21:50 UTC
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Cole Robinson 2009-12-02 03:01:50 UTC
Fixed upstream, I went with Dan's recommended naming scheme:

http://hg.fedorahosted.org/hg/virt-manager/rev/c2d8f51bc161

Comment 9 Cole Robinson 2009-12-03 23:56:09 UTC
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.