Bug 491112 - QEMU disks show up in anaconda as UNKNOWN
QEMU disks show up in anaconda as UNKNOWN
Product: Fedora
Classification: Fedora
Component: parted (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Joel Andres Granados
Fedora Extras Quality Assurance
Depends On:
Blocks: F11VirtTarget
  Show dependency treegraph
Reported: 2009-03-19 10:08 EDT by James Laska
Modified: 2013-09-02 02:32 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-03-26 10:58:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Screenshot (81.75 KB, image/png)
2009-03-19 10:08 EDT, James Laska
no flags Details
Screenshot (shows IDE, SCSI and VirtIO disks) (70.25 KB, image/png)
2009-03-19 10:33 EDT, James Laska
no flags Details

  None (edit)
Description James Laska 2009-03-19 10:08:54 EDT
Created attachment 335857 [details]

Description of problem:

In F10, when installing in a KVM guest, the guest disks would show up in anaconda as QEMU disks.  In rawhide, they show up as UNKNOWN (see attached screenshot).

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

libvirt.i586                              0.6.1-5.fc11                                            rawhide
qemu.i586                                 2:0.10-0.9.kvm20090310git.fc11                          rawhide
virt-manager.i586                         0.7.0-1.fc11                                            rawhide

How reproducible:

Additional info:

    <disk type='block' device='disk'>
      <source dev='/dev/mapper/VolGroup00-vguest1--disk0'/>
      <target dev='vda' bus='virtio'/>
Comment 1 James Laska 2009-03-19 10:33:16 EDT
Created attachment 335858 [details]
Screenshot (shows IDE, SCSI and VirtIO disks)

Attached screenshot shows an install with 3 disks (IDE, SCSI and VirtIO).  Seems like just the virtio disks showing up as UNKNOWN
Comment 2 James Laska 2009-03-19 10:34:02 EDT
The virt host is F10 and included the following packages:
 * kvm-74-10.fc10.x86_64
 * virt-manager-0.6.0-5.fc10.x86_64
 * libvirt-0.5.1-2.fc10.x86_64
 * kernel-
Comment 3 Glauber Costa 2009-03-20 12:16:12 EDT
Verified this...

QEMU does not get involved.
Anaconda gets this information from sysfs.
virtio devices does not export model information to sysfs.
So this is a kernel problem.

Whenever I get some cycles, I plan on implementing it.
We can leave this bug as-is, to keep track of it.
Comment 4 Mark McLoughlin 2009-03-25 08:43:30 EDT
Looks like these strings are coming from parted

The way it works for Xen is:

        } else if (dev_major == XVD_MAJOR && (dev_minor % 0x10 == 0)) {
                dev->type = PED_DEVICE_XVD;
        case PED_DEVICE_XVD:
                if (!init_generic (dev, _("Xen Virtual Block Device")))
                        goto error_free_arch_specific;
        char*           transport[14] = {...

See e.g.


Moving to parted
Comment 5 Mark McLoughlin 2009-03-26 06:39:55 EDT
Just chatting to jgranado on irc - virtio_blk doesn't have an assigned major:

  major = register_blkdev(0, "virtblk");
Comment 6 Joel Andres Granados 2009-03-26 08:58:25 EDT
Only thing I could come up with that would be rather consistent is to use /sys/block/vda/device/modalias and grep for virtio.

any suggestions?
Comment 7 Joel Andres Granados 2009-03-26 09:06:07 EDT
OTOH /proc/devices and grep for virtblk is probably better.  that is what is currently done with device-mapper devs.
Comment 8 Joel Andres Granados 2009-03-26 10:58:17 EDT
this will be fixed in the next version of parted 1.8.8-15.
Comment 9 Joel Andres Granados 2009-03-26 11:00:04 EDT
parted 1.8.8-16 is the next. sorry.
Comment 10 Mark McLoughlin 2009-03-26 11:56:04 EDT
Cool, you went with the /proc/devices option - thanks.

For reference, patch is this one:

Comment 11 Jim Meyering 2009-03-26 12:15:12 EDT
Hi Joel,
Thanks for doing that.  Patch looks perfect.
If you post upstream, I'll ack/apply it.  Bonus points if you can write or outline a test to exercise either part of the new code ;-)

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