Bug 923053
Summary: | change-media can not insert media on block type cdrom | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | weizhang <weizhan> |
Component: | libvirt | Assignee: | Gunannan Ren <gren> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.4 | CC: | acathrow, cwei, dallan, dyuan, jdenemar, jyang, lnovich, mzhan, pkrempa, xuzhang, ydu |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-0.10.2-22.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-11-21 08:52:08 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
weizhang
2013-03-19 05:44:14 UTC
This apparently never worked since virsh is generating incorrect XML for block disk types. It uses "<source block='/dev/sdb'/>" while the correct name of the attribute for block disks is "dev". (In reply to comment #1) > This apparently never worked since virsh is generating incorrect XML for > block disk types. It uses "<source block='/dev/sdb'/>" while the correct > name of the attribute for block disks is "dev". So this implies 2 bugs: One is of virsh XML generator, one is the qemu API should fail if the XML is not right. The second bug is already covered by bug 888748 requesting RNG validation. (In reply to comment #3) > The second bug is already covered by bug 888748 requesting RNG validation. Hum, it's something I tried to do long time ago, but then forgot. http://www.redhat.com/archives/libvir-list/2012-January/msg00274.html I'm going to pick it again. proposed patch sent to upstream https://www.redhat.com/archives/libvir-list/2013-May/msg01851.html This bug is verified on latest libvirt build: libvirt-0.10.2-22.el6.x86_64 steps: 1. start one guest with the following xml. <disk type='block' device='cdrom'> <driver name='qemu' type='raw'/> <target dev='hdc' bus='ide'/> <readonly/> </disk> 2. prepare one block disk for inserting, make sure that there is one file on the block disk. # mount /dev/sdb /mnt # ls /mnt/ lost+found newfile # umount /mnt 3. insert the blcok disk to the guest cdrom, the source dev can be seen. # virsh change-media a hdc /dev/sdb --insert succeeded to complete action insert on media # virsh dumpxml a|grep cdrom -A 5 <disk type='block' device='cdrom'> <driver name='qemu' type='raw'/> <source dev='/dev/sdb'/> <target dev='hdc' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> 4. login the guest, make sure the files can be seen in the guest. # mount /dev/cdrom /mnt/ mount: block device /dev/sr0 is write-protected, mounting read-only # ls /mnt/ lost+found newfile So, change the bug status to "verify". 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/RHBA-2013-1581.html |