Red Hat Bugzilla – Bug 801772
RFE: Use scsi-hd, scsi-cd instead of scsi-disk
Last modified: 2013-02-21 02:08:36 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.
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.
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?
(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.
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?
Let's limit this bug to the scsi-disk split, so we can wrap it up. Feel free to change the title.
Thanks Markus. According to comment 4 and comment 7, verify PASS.
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