Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 801772

Summary: RFE: Use scsi-hd, scsi-cd instead of scsi-disk
Product: Red Hat Enterprise Linux 6 Reporter: Markus Armbruster <armbru>
Component: libvirtAssignee: Osier Yang <jyang>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: acathrow, dallan, dyuan, juzhang, mzhan, rwu, weizhan
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.10.0-0rc0.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 07:08:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Markus Armbruster 2012-03-09 13:16:15 UTC
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 08:55:16 UTC
commit a4cda054e7fac8165e9c800b41090caf9fde761a
Author: Osier Yang <jyang>
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>
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 09:50:48 UTC
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 06:59:17 UTC
(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 07:25:00 UTC
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 07:52:46 UTC
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 08:28:21 UTC
Thanks Markus. According to comment 4 and comment 7, verify PASS.

Comment 9 errata-xmlrpc 2013-02-21 07:08:36 UTC
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