Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 801772 - RFE: Use scsi-hd, scsi-cd instead of scsi-disk
RFE: Use scsi-hd, scsi-cd instead of scsi-disk
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Osier Yang
Virtualization Bugs
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-09 08:16 EST by Markus Armbruster
Modified: 2013-02-21 02:08 EST (History)
7 users (show)

See Also:
Fixed In Version: libvirt-0.10.0-0rc0.el6
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:08:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 16:18:26 EST

  None (edit)
Description Markus Armbruster 2012-03-09 08:16:15 EST
Description of problem:

Devices ide-drive and scsi-disk give you a CD-ROM when the backend has parameter media=cdrom (default), else a disk.

Upstream split them into ide-hd, ide-cd, scsi-hd, scsi-cd in 0.15. Upstream's forthcoming -blockdev will only work with the new devices.
The old devices still work with the existing ways to create backends, such as -drive, but they'll go away eventually.

I recommend upstream libvirt switches to the new devices and stops using parameter "media" sooner rather than later.

Whether that upstream libvirt change needs to be backported to RHEL-6 is not clear, yet.  Yes if we backport -blockdev.  Else probably no. I'm filing this RFE now anyway to make sure we don't forget.

Note that ide-{cd,hd} don't exist in RHEL-6, yet.  scsi-{cd,hd} do.
Comment 2 Osier Yang 2012-05-28 04:55:16 EDT
commit a4cda054e7fac8165e9c800b41090caf9fde761a
Author: Osier Yang <jyang@redhat.com>
Date:   Tue Apr 17 17:16:52 2012 +0800

    qemu: Split ide-drive into ide-cd and ide-hd
    
    A "ide-drive" device can be either a hard disk or a CD-ROM,
    if there is ",media=cdrom" specified for the backend, it's
    a CD-ROM, otherwise it's a hard disk.
    
    Upstream qemu splitted "ide-drive" into "ide-hd" and "ide-cd"
    since commit 1f56e32, and ",media=cdrom" is not required for
    ide-cd anymore. "ide-drive" is still supported for backwards
    compatibility, but no doubt we should go foward.

commit 02e8d0cfdf8723d33660b3273ed9cac214695061
Author: Osier Yang <jyang@redhat.com>
Date:   Tue Apr 17 17:08:05 2012 +0800

    qemu: Split scsi-disk into into scsi-hd and scsi-cd
    
    A "scsi-disk" device can be either a hard disk or a CD-ROM,
    if there is ",media=cdrom" specified for the backend, it's
    a CD-ROM, otherwise it's a hard disk.
    
    But upstream qemu splitted "scsi-disk" into "scsi-hd" and
    "scsi-cd" since commit b443ae, and ",media=cdrom" is not
    required for scsi-cd anymore. "scsi-disk" is still supported
    for backwards compatibility, but no doubt we should go
    foward.

Commits in upstream. Move to POST.
Comment 4 weizhang 2012-08-06 05:50:48 EDT
Test on 
kernel-2.6.32-289.el6.x86_64
qemu-kvm-0.12.1.2-2.302.el6.x86_64
libvirt-0.10.0-0rc0.el6.x86_64

1. Test scsi-disk split
Start a guest with
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/desktop.img'/>
      <target dev='sda' bus='scsi'/>
      <serial>sldfjklsjdf</serial>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/boot.iso'/>
      <target dev='sdc' bus='scsi'/>
      <readonly/>
      <alias name='scsi0-0-1-0'/>
      <address type='drive' controller='0' bus='0' target='1' unit='0'/>
    </disk>
will get the qemu-kvm command

-drive file=/var/lib/libvirt/images/desktop.img,if=none,id=drive-scsi0-0-0-0,format=raw,serial=sldfjklsjdf -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1
-drive file=/var/lib/libvirt/images/boot.iso,if=none,id=drive-scsi0-0-1-0,readonly=on,format=raw -device scsi-cd,bus=scsi0.0,channel=0,scsi-id=1,lun=0,drive=drive-scsi0-0-1-0,id=scsi0-0-1-0

So it passes.

2. For ide-drive split, qemu-kvm still not support ide-hd and ide-cd in rhel version, then how can I verify it? Or just wait for qemu-kvm supported?
Comment 5 Osier Yang 2012-08-07 02:59:17 EDT
(In reply to comment #4)
> Test on 
> kernel-2.6.32-289.el6.x86_64
> qemu-kvm-0.12.1.2-2.302.el6.x86_64
> libvirt-0.10.0-0rc0.el6.x86_64
> 
> 1. Test scsi-disk split
> Start a guest with
>     <disk type='file' device='disk'>
>       <driver name='qemu' type='raw'/>
>       <source file='/var/lib/libvirt/images/desktop.img'/>
>       <target dev='sda' bus='scsi'/>
>       <serial>sldfjklsjdf</serial>
>       <alias name='scsi0-0-0-0'/>
>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>     </disk>
>     <disk type='file' device='cdrom'>
>       <driver name='qemu' type='raw'/>
>       <source file='/var/lib/libvirt/images/boot.iso'/>
>       <target dev='sdc' bus='scsi'/>
>       <readonly/>
>       <alias name='scsi0-0-1-0'/>
>       <address type='drive' controller='0' bus='0' target='1' unit='0'/>
>     </disk>
> will get the qemu-kvm command
> 
> -drive
> file=/var/lib/libvirt/images/desktop.img,if=none,id=drive-scsi0-0-0-0,
> format=raw,serial=sldfjklsjdf -device
> scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,
> id=scsi0-0-0-0,bootindex=1
> -drive
> file=/var/lib/libvirt/images/boot.iso,if=none,id=drive-scsi0-0-1-0,
> readonly=on,format=raw -device
> scsi-cd,bus=scsi0.0,channel=0,scsi-id=1,lun=0,drive=drive-scsi0-0-1-0,
> id=scsi0-0-1-0
> 
> So it passes.
> 
> 2. For ide-drive split, qemu-kvm still not support ide-hd and ide-cd in rhel
> version, then how can I verify it? Or just wait for qemu-kvm supported?

There is no definite plan of qemu if will backport the the patches to split ide-hd or ide-cd or not. So I suggest edit the bug title, and ignore the ide now.
Comment 6 weizhang 2012-08-07 03:25:00 EDT
Hi Markus,

According to comment 4 and comment 5, do you think we should change the bug title, ignore the ide-driver split, or wait for the qemu backport for it on rhel6.4?
Comment 7 Markus Armbruster 2012-08-07 03:52:46 EDT
Let's limit this bug to the scsi-disk split, so we can wrap it up.  Feel free to change the title.
Comment 8 weizhang 2012-08-07 04:28:21 EDT
Thanks Markus. According to comment 4 and comment 7, verify PASS.
Comment 9 errata-xmlrpc 2013-02-21 02:08:36 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0276.html

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