Bug 2163117 - virt-xml: Updating cdrom device file: Error attempting device update: internal error: unable to execute QEMU command 'blockdev-remove-medium': Tray of device 'scsi0-0-0' is not open
Summary: virt-xml: Updating cdrom device file: Error attempting device update: interna...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: CockpitTest
Depends On:
Blocks: 2166411
TreeView+ depends on / blocked
 
Reported: 2023-01-23 06:10 UTC by Martin Pitt
Modified: 2023-05-25 01:10 UTC (History)
10 users (show)

Fixed In Version: libvirt-9.0.0-3.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2166411 (view as bug list)
Environment:
Last Closed: 2023-05-25 01:10:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Martin Pitt 2023-01-23 06:10:20 UTC
Description of problem: In recent Fedora (and also Arch Linux [1]) there is a regression with trying to insert/change a virtual CD-ROM medium.


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

virt-install-4.1.0-1.fc37.noarch
libvirt-daemon-9.0.0-1.fc38.x86_64
qemu-system-x86-core-7.2.0-4.fc38.x86_64
kernel-core-6.2.0-0.rc4.20230118gitc1649ec55708.33.fc38.x86_64

How reproducible: Always


Steps to Reproduce:

systemctl start virtqemud virtnetworkd
virsh net-start default || true  # may already be running
touch /var/lib/libvirt/bogus.iso
virt-install --memory 50 --pxe --virt-type qemu --graphics none --os-variant alpinelinux3.8 --disk device=cdrom,bus=scsi --wait 0 --name test1
virt-xml test1 --edit target.dev=sda --disk source.file=/var/lib/libvirt/bogus.iso,type=file --update

Actual results: Last command fails with

ERROR    Error attempting device update: internal error: unable to execute QEMU command 'blockdev-remove-medium': Tray of device 'scsi0-0-0' is not open


Expected results: command succeeds, and turns the previous

    <disk type='file' device='cdrom'>
      <driver name='qemu'/>
      <target dev='sda' bus='scsi'/>
      <readonly/>
      <alias name='scsi0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

into

    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/bogus.iso' index='2'/>
      <backingStore/>
      <target dev='sda' bus='scsi'/>
      <readonly/>
      <alias name='scsi0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

Additional info: This could very well be a regression in QEMU. If so, please reassign. Thanks!

Comment 1 Jonathon Jongsma 2023-02-01 20:46:43 UTC
libvirt bug. See https://bugzilla.redhat.com/show_bug.cgi?id=2166411#c1

Comment 2 Ben Cotton 2023-02-07 15:06:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 3 Martin Pitt 2023-04-30 07:50:47 UTC
Note that while this is fixed in RHEL/CentOS Stream 9, and does not happen in Fedora 37, this still affects Fedora 38 [1]. can you please apply the fix there as well?

[1] https://cockpit-logs.us-east-1.linodeobjects.com/pull-4674-20230425-105203-1e26067d-fedora-testing-cockpit-project-cockpit-machines/TestMachinesDisks-testInsertDiscCDROM-fedora-testing-127.0.0.2-2801-FAIL.png

Comment 4 Fedora Update System 2023-05-07 17:51:03 UTC
FEDORA-2023-7564d5eb0a has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-7564d5eb0a

Comment 5 Fedora Update System 2023-05-08 02:18:12 UTC
FEDORA-2023-7564d5eb0a has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-7564d5eb0a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-7564d5eb0a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2023-05-25 01:10:44 UTC
FEDORA-2023-7564d5eb0a has been pushed to the Fedora 38 stable repository.
If problem still persists, 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.