Bug 1229819 - Cannot connect media if cdrom is boot device
Summary: Cannot connect media if cdrom is boot device
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 22
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-09 17:26 UTC by adruch2002
Modified: 2015-08-18 05:14 UTC (History)
4 users (show)

Fixed In Version: virt-manager-1.2.1-2.fc22
Clone Of:
Environment:
Last Closed: 2015-08-18 05:14:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
virt-manager debug logging output (7.28 KB, text/plain)
2015-06-09 17:26 UTC, adruch2002
no flags Details

Description adruch2002 2015-06-09 17:26:28 UTC
Created attachment 1036923 [details]
virt-manager debug logging output

Description of problem:

If a guest is running and the CDROM is a boot device, media cannot be connected. Some more details are available in this mailing list entry (https://lists.fedoraproject.org/pipermail/virt/2015-June/004288.html), however I was able to simply the steps to reproduce the issue to what is shown below.

https://lists.fedoraproject.org/pipermail/virt/2015-June/004288.html

Version-Release number of selected component (if applicable):
virt-manager-1.2.0-1.fc22.noarch
libvirt-1.2.13.1-2.fc22.x86_64


How reproducible:
100%

Steps to Reproduce:
1. In virt-manager, open details window for powered-off guest
2. Under "Boot Options", enable empty CDROM as boot device. 
3. Start guest, which should work fine.
4. In the virt-manager details window, attempt to attach a source ISO to the CDROM device. 

Actual results:

summary=These changes will take effect after the next guest shutdown.
details=unsupported configuration: boot order 2 is already used by another device

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 1420, in change_config_helper
    define_func(devobj=devobj, do_hotplug=True, **define_args)
  File "/usr/share/virt-manager/virtManager/domain.py", line 804, in define_disk
    self.hotplug(**hotplug_kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1111, in hotplug
    self.attach_device(device)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1041, in attach_device
    self._backend.attachDevice(devxml)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 508, in attachDevice
    if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self)
libvirtError: unsupported configuration: boot order 2 is already used by another device

Expected results:
Expected it to work

Additional info:
Attached is the debug log output from virt-manager

Comment 1 Logan Rodrian 2015-06-15 15:44:45 UTC
I am also witnessing this issue after upgrading to Fedora 22 with a similar use case, but can also reproduce the case described by adruch2002 with the same package versions and results.

Comment 2 Cole Robinson 2015-08-10 23:07:27 UTC
Thanks for the report. Fixed by having virt-manager finally use libvirt UpdateDevice for disk media change, it's been around a long time now:

commit 40d4c378680275ee432fbf4825c55737bc8c3fc2
Author: Cole Robinson <crobinso>
Date:   Mon Aug 10 18:30:12 2015 -0400

    domain: Use UpdateDevice for CDROM media change (bz 1229819)

Comment 3 Fedora Update System 2015-08-11 20:11:56 UTC
virt-manager-1.2.1-2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/virt-manager-1.2.1-2.fc22

Comment 4 Fedora Update System 2015-08-13 16:53:49 UTC
Package virt-manager-1.2.1-2.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing virt-manager-1.2.1-2.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-13390/virt-manager-1.2.1-2.fc22
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2015-08-18 05:14:20 UTC
virt-manager-1.2.1-2.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


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