Bug 1057969 - vdsm: cannot start a vm in read only with IDE disk type
Summary: vdsm: cannot start a vm in read only with IDE disk type
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 3.3.0
Hardware: x86_64
OS: Linux
Target Milestone: ---
: 3.4.0
Assignee: Sergey Gotliv
QA Contact: Aharon Canan
Whiteboard: storage
Depends On: 1057546
Blocks: rhev3.4beta 1142926
TreeView+ depends on / blocked
Reported: 2014-01-26 08:57 UTC by Sean Cohen
Modified: 2016-02-10 20:58 UTC (History)
13 users (show)

Fixed In Version: ovirt-3.4.0-beta3
Doc Type: Bug Fix
Doc Text:
Previously, it was possible to specify the 'Read Only' option for disks that used the IDE interface and were attached to virtual machines. This prevented virtual machines with this setting enabled from starting due to an exception in libvirt. Now, it is no longer possible to specify this option for disks using the IDE interface.
Clone Of: 1057546
Last Closed: 2014-06-09 13:28:11 UTC
oVirt Team: Storage
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0504 0 normal SHIPPED_LIVE vdsm 3.4.0 bug fix and enhancement update 2014-06-09 17:21:35 UTC
oVirt gerrit 23953 0 None MERGED engine: Validate that IDE disk is not read-only 2020-05-06 14:26:22 UTC
oVirt gerrit 23998 0 None MERGED webadmin: Prevent selection of IDE disk as read-only in UI 2020-05-06 14:26:22 UTC
oVirt gerrit 24258 0 None MERGED engine: Validate that IDE disk is not read-only 2020-05-06 14:26:22 UTC
oVirt gerrit 24259 0 None MERGED webadmin: Prevent selection of IDE disk as read-only in UI 2020-05-06 14:26:22 UTC

Description Sean Cohen 2014-01-26 08:57:46 UTC
+++ This bug was initially created as a clone of Bug #1057546 +++

Description of problem:

we cannot start a vm with IDE disk+read-only. 

This looks like it might fail in libvirt. 

Version-Release number of selected component (if applicable):

[root@cougar06 ~]# rpm -qa |grep libvirt 
[root@cougar06 ~]# rpm -qa |grep vdsm
[root@cougar06 ~]# rpm -qa |grep qemu
[root@cougar06 ~]# 

How reproducible:


Steps to Reproduce:
1. create a vm with IDE disk and read-only
2. start it

Actual results:

we fail to start the vm

Expected results:

we should either fail in Engine with CanDoAction or support this. 

Additional info:

Thread-37694::ERROR::2014-01-24 12:16:02,114::vm::2273::vm.Vm::(_startUnderlyingVm) vmId=`a895a0db-e35a-47a5-b019-9ebfc0033545`::The vm start process failed
Traceback (most recent call last):
  File "/usr/share/vdsm/vm.py", line 2233, in _startUnderlyingVm
  File "/usr/share/vdsm/vm.py", line 3164, in _run
    self._connection.createXML(domxml, flags),
  File "/usr/lib64/python2.6/site-packages/vdsm/libvirtconnection.py", line 92, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2665, in createXML
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: internal error process exited while connecting to monitor: qemu-kvm: -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1: Can't use a read-only drive
qemu-kvm: -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1: Device 'ide-drive' could not be initialized

.SimpleLogAdapter instance at 0x7fa9fc1507e8> name:hdc networkDev:False path: readonly:true reqsize:0 serial: shared:false specParams:{'path': ''} transientDisk:False truesize:0 type:disk volExtensionChunk:1024 watermarkLimit:536870912
Traceback (most recent call last):
  File "/usr/share/vdsm/clientIF.py", line 326, in teardownVolumePath
    res = self.irs.teardownImage(drive['domainID'],
  File "/usr/share/vdsm/vm.py", line 1493, in __getitem__
    raise KeyError(key)
KeyError: 'domainID'
Thread-37770::INFO::2014-01-24 12:17:54,287::logUtils::44::dispatcher::(wrapper) Run and protect: teardownImage(sdUUID='be5731ac-ce60-4302-ab04-99573f6799e4', spUUID='6fe33247-68e1-4e46-be2a-ab90ab4384e3', imgUUID='76297de9-4ac8-4822-b1df-58dbc36da7b6', volUUID=None)
Thread-37770::INFO::2014-01-24 12:17:54,288::logUtils::47::dispatcher::(wrapper) Run and protect: teardownImage, Return response: None
Thread-37770::INFO::2014-01-24 12:17:54,291::logUtils::44::dispatcher::(wrapper) Run and protect: inappropriateDevices(thiefId='a895a0db-e35a-47a5-b019-9ebfc0033545')
Thread-37770::INFO::2014-01-24 12:17:54,300::logUtils::47::dispatcher::(wrapper) Run and protect: inappropriateDevices, Return response: None
Thread-37770::DEBUG::2014-01-24 12:17:54,300::vm::4609::vm.Vm::(deleteVm) vmId=`a895a0db-e35a-47a5-b019-9ebfc0033545`::Total desktops after destroy of a895a0db-e35a-47a5-b019-9ebfc0033545 is 0
Thread-37770::DEBUG::2014-01-24 12:17:54,301::BindingXMLRPC::977::vds::(wrapper) return vmDestroy with {'status': {'message': 'Machine destroyed', 'code': 0}

--- Additional comment from Itamar Heim on 2014-01-26 03:11:11 EST ---

Setting target release to current version for consideration and review. please
do not push non-RFE bugs to an undefined target release to make sure bugs are
reviewed for relevancy, fix, closure, etc.

Comment 2 Sergey Gotliv 2014-01-28 10:55:01 UTC
Read only IDE disks are not supported by QEMU. The only exception for that is the cdrom. We can only validate that the IDE disk is not marked as a read-only.

Comment 6 Leonid Natapov 2014-02-19 15:10:50 UTC
tested on 3.4.0-0.11.beta3.el6. IDE disk can not be read only. It blocked by UI and backend.

Comment 12 errata-xmlrpc 2014-06-09 13:28:11 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.


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