Bug 1112939
Summary: | libvirt should prompt more readable error message while ide/sata bus disk do not support readonly | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Xuesong Zhang <xuzhang> |
Component: | libvirt | Assignee: | Giuseppe Scrivano <gscrivan> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | dyuan, jdenemar, mzhan, rbalakri, shyu, virt-maint, xuzhang, yanyang |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-1.2.8-4.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-03-05 07:38:21 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
Xuesong Zhang
2014-06-25 05:23:44 UTC
Could you tell us what qemu-kvm version was used? And, please, attach /var/log/libvirt/qemu/r7.log. Anyway, we just provide what we got from qemu-kvm. And the error seems to be pretty clear to me. However, I would expect readonly to work even for disks, not just cdroms. Let qemu guys investigate if this is expected to fail or not. hi, Jiri, This behave is as expected from qemu-kvm said, I have contact with the qemu guys already. Please the following bug comment: https://bugzilla.redhat.com/show_bug.cgi?id=915162#c1 I file this bug for the error message, not the fail result. It's better to generate one more readable error message like the following one: # virsh start r7 error: Failed to start domain r7 error: unsupported configuration: readonly is not supported for bus='ide' and 'sata' (In reply to Jiri Denemark from comment #1) > Could you tell us what qemu-kvm version was used? And, please, attach > /var/log/libvirt/qemu/r7.log. > > Anyway, we just provide what we got from qemu-kvm. And the error seems to be > pretty clear to me. However, I would expect readonly to work even for disks, > not just cdroms. Let qemu guys investigate if this is expected to fail or > not. patch proposed upstream: https://www.redhat.com/archives/libvir-list/2014-June/msg01441.html fixed upstream with: commit 72f919f558902968bd0cf9f99f25ac62cbfe3ac6 Author: Giuseppe Scrivano <gscrivan> Date: Mon Jun 30 12:05:06 2014 +0200 qemu: raise an error when trying to use readonly ide disks The IDE bus doesn't support readonly disks, so inform the user with an error message instead of let qemu fail with a more obscure "Device 'ide-hd' could not be initialized" error message. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1112939 Signed-off-by: Giuseppe Scrivano <gscrivan> Hi Giuseppe, I seems that the patch does not raise an accurate error when trying to use readonly SATA disks. It only fixs the error when trying to use readonly IDE disks. # rpm -q libvirt libvirt-1.2.8-3.el7.x86_64 Steps: 1. # virsh dumpxml qe-con | grep disk -a6 <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/var/lib/libvirt/images/qe-con.qcow2'/> <target dev='hda' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/test.img'/> <target dev='vdb' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </disk> # virsh start qe-con error: Failed to start domain qe-con error: unsupported configuration: readonly ide disks are not supported 2. # virsh dumpxml qe-con | grep disk -a6 <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/var/lib/libvirt/images/qe-con.qcow2'/> <target dev='sda' bus='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> # virsh start qe-con error: Failed to start domain qe-con error: internal error: process exited while connecting to monitor: 2014-09-22T10:44:17.334327Z qemu-kvm: -device ide-hd,bus=ahci0.0,drive=drive-sata0-0-0,id=sata0-0-0,bootindex=1: Can't use a read-only drive 2014-09-22T10:44:17.334384Z qemu-kvm: -device ide-hd,bus=ahci0.0,drive=drive-sata0-0-0,id=sata0-0-0,bootindex=1: Device initialization failed. 2014-09-22T10:44:17.334405Z qemu-kvm: -device ide-hd,bus=ahci0.0,drive=drive-sata0-0-0,id=sata0-0-0,bootindex=1: Device 'ide-hd' could not be initialized In step 2: the error messages are not friendly. Verified on libvirt-1.2.8-4.el7.x86_64 Steps: 1. # virsh dumpxml qe-con | grep disk -a6 <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/var/lib/libvirt/images/qe-con.qcow2'/> <target dev='hda' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> # virsh start qe-con error: Failed to start domain qe-con error: unsupported configuration: readonly ide disks are not supported 2. # virsh dumpxml qe-con | grep disk -a6 <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/var/lib/libvirt/images/qe-con.qcow2'/> <target dev='sda' bus='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> # virsh start qe-con error: Failed to start domain qe-con error: unsupported configuration: readonly sata disks are not supported Since the above steps got the expected results, I'd like to set it to verified. 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. https://rhn.redhat.com/errata/RHSA-2015-0323.html |