Bug 1615414 - Unable to change CD for drivers installation while installing a system from CD
Summary: Unable to change CD for drivers installation while installing a system from CD
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: General
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.2.7
: ---
Assignee: Milan Zamazal
QA Contact: Liran Rotenberg
URL:
Whiteboard:
Depends On: 1621910
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-13 14:29 UTC by Petr Matyáš
Modified: 2018-11-02 14:35 UTC (History)
6 users (show)

Fixed In Version: v4.20.40
Clone Of:
Environment:
Last Closed: 2018-11-02 14:34:19 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: blocker+


Attachments (Terms of Use)
engine, vdsm, libvirt logs (13.27 MB, application/octet-stream)
2018-08-14 06:51 UTC, Petr Matyáš
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 94263 0 master MERGED spec: Depend on libvirt 4.5.0-9.el7 on RHEL 2018-09-11 09:52:00 UTC
oVirt gerrit 94271 0 ovirt-4.2 MERGED spec: Depend on libvirt 4.5.0-9.el7 on RHEL 2018-09-11 12:01:37 UTC

Description Petr Matyáš 2018-08-13 14:29:17 UTC
Description of problem:
I'm installing a Windows system from CD but am unable to change the CD during installation to install drivers (I wouldn't see the disk for OS installation otherwise). I keep getting prompted to eject the CD in the guest, but that is not possible.

Version-Release number of selected component (if applicable):
ovirt-engine-4.2.6-0.1.el7ev.noarch
vdsm-4.20.35-1.el7ev.x86_64
libvirt-4.5.0-3.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. create a VM and start it with Windows installation CD
2. try to change the CD to virtio-win iso during the installation
3.

Actual results:
change CD fails

Expected results:
change CD should succeed so Windows guests can be used in RHV

Additional info:
engine log:
2018-08-13 15:56:57,331+02 ERROR [org.ovirt.engine.core.bll.storage.disk.ChangeDiskCommand] (de
fault task-1) [062b2c31-d44d-4f8e-ae91-2fb98c285625] Command 'org.ovirt.engine.core.bll.storage
.disk.ChangeDiskCommand' failed: EngineException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDS
ErrorException: VDSGenericException: VDSErrorException: Failed in vdscommand to ChangeDiskVDS,
error = Failed to change disk image (Failed with error FAILED_CHANGE_CD_IS_MOUNTED and code 41)
2018-08-13 15:56:57,331+02 DEBUG [org.ovirt.engine.core.bll.storage.disk.ChangeDiskCommand] (de
fault task-1) [062b2c31-d44d-4f8e-ae91-2fb98c285625] Exception: org.ovirt.engine.core.common.er
rors.EngineException: EngineException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorExcept
ion: VDSGenericException: VDSErrorException: Failed in vdscommand to ChangeDiskVDS, error = Fai
led to change disk image (Failed with error FAILED_CHANGE_CD_IS_MOUNTED and code 41)

vdsm log:
2018-08-13 15:56:57,604+0200 ERROR (jsonrpc/1) [virt.vm] (vmId='95162aa0-7ee4-4b95-a2da-ec96c7fe84aa') forceful updateD
eviceFlags failed (vm:5036)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/virt/vm.py", line 5033, in _changeBlockDev
    diskelem_xml, libvirt.VIR_DOMAIN_DEVICE_MODIFY_FORCE
  File "/usr/lib/python2.7/site-packages/vdsm/virt/virdomain.py", line 98, in f
    ret = attr(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/common/libvirtconnection.py", line 130, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/common/function.py", line 92, in wrapper
    return func(inst, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 2772, in updateDeviceFlags
    if ret == -1: raise libvirtError ('virDomainUpdateDeviceFlags() failed', dom=self)
libvirtError: operation forbidden: changing device alias is not allowed

Comment 1 Michal Skrivanek 2018-08-14 04:28:07 UTC
please attach both logs

Comment 2 Petr Matyáš 2018-08-14 06:51:19 UTC
Created attachment 1475752 [details]
engine, vdsm, libvirt logs

Sorry, thought I attached it yesterday, but bugzilla has a regression about attachments.

Comment 3 Red Hat Bugzilla Rules Engine 2018-08-17 08:46:40 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 4 Arik 2018-08-23 11:35:55 UTC
Looks like a regression in libvirt.

The XML that VDSM passes to libvirt in order to change cd-rom never contained the device's alias [1].

An an evidence, following is the log of changing a device in my env (that succeeds):
2018-08-23 03:39:59,292-0400 INFO  (jsonrpc/1) [virt.vm] (vmId='4d245198-a8b2-4562-b26d-2c0e5f95db60') changeBlockDev: using disk XML: <?xml version='1.0' encoding='utf-8'?> <disk device="cdrom" type="file"><source file="/rhev/datacenter/mnt/10.35.1.90:_srv_iso/d11a48a1-2fd6-45fb-9648-ac8c29ec8804/images/11111111-1111-1111-1111-111111111111/Fedora-Server-dvd-x86_64-24-1.2.iso" /><target bus="ide" dev="hdc" /></disk>

In my env, libvirt 3.9.0 is installed (centos 7.5).
So it may be a regression introduced in a later version of libvirt (I see that the bug happened with libvirt 4.5.0). 

Petr, is it possible for you to check with an earlier version of libvirt?

[1] https://github.com/ovirt/vdsm/blob/v4.20.35/lib/vdsm/virt/vm.py#L5011-L5019

Comment 5 Petr Matyáš 2018-08-23 13:18:12 UTC
Yeah, it's libvirt regression (or feature), but I'm not sure how to move this bug to libvirt.

When using libvirt-3.9.0-14.el7_5.6.x86_64 with the same scenario, there is no problem with changing a CD.

Comment 6 Jaroslav Suchanek 2018-08-30 13:21:13 UTC
This is probably related to bug bug 1621910. The dependency is already set. If you need rhel-7.5.z, please set it in the bug 1621910.

Michale, can you please confirm?

Thanks.

Comment 7 Michal Privoznik 2018-08-30 14:34:02 UTC
Yes, this is the same bug.

Comment 8 Michal Skrivanek 2018-09-05 12:24:48 UTC
need to require 7.6 libvirt

Comment 9 Liran Rotenberg 2018-09-20 14:23:08 UTC
Verified on:
libvirt-daemon-4.5.0-10.el7.x86_64
vdsm-4.20.40-1.el7ev.x86_64
ovirt-engine-4.2.7-0.1.el7ev.noarch

Steps:
1. Create a VM and start it with Windows installation CD.
2. Change the CD during the installation.

Results:
The CD was changed without any error during the installation.
The VM recognized the CD that was changed.

Comment 10 Sandro Bonazzola 2018-11-02 14:34:19 UTC
This bugzilla is included in oVirt 4.2.7 release, published on November 2nd 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.7 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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