libvirtd unable to execute QEMU command 'blockdev-remove-medium'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Fedora) |
Unknown
|
Low
|
|||
libvirt (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
env :
ubuntu 20.04.4
libvirt-daemon 6.0.0-0ubuntu8.8
qemu-kvm 1:4.2-3ubuntu6.15
attache a centos/ubuntu iso to VM,after os installation complete , after os reboot , I want to detach iso from VM. faild to detach iso from dvd device
syslog:
Jun 1 17:03:21 dev2cn02 libvirtd[1767]: internal error: unable to execute QEMU command 'blockdev-
Jun 1 17:03:21 dev2cn02 java[2968]: libvirt: QEMU Driver error : internal error: unable to execute QEMU command 'blockdev-
Jun 1 17:03:21 dev2cn02 java[2968]: WARN [kvm.storage.
VM dumpxml:
<domain type='kvm' id='5'>
<name>
<uuid>
<description>
<memory unit='KiB'
<currentMemory unit='KiB'
<vcpu placement=
<cputune>
<shares>
</cputune>
<resource>
<partition>
</resource>
<sysinfo type='smbios'>
<system>
<entry name='manufactu
<entry name='product'
<entry name='uuid'
</system>
</sysinfo>
<os>
<type arch='x86_64' machine=
<boot dev='cdrom'/>
<boot dev='hd'/>
<smbios mode='sysinfo'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu mode='host-
<feature policy='require' name='vmx'/>
</cpu>
<clock offset='utc'>
<timer name='kvmclock'/>
</clock>
<on_poweroff>
<on_reboot>
<on_crash>
<devices>
<emulator>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<auth username=
<secret type='ceph' uuid='44069041-
</auth>
<source protocol='rbd' name='rbd/
<host name='10.
<host name='10.
<host name='10.
</source>
<target dev='vda' bus='virtio'/>
<
<alias name='virtio-
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/
<
<target dev='hdc' bus='ide' tray='open'/>
<readonly/>
<alias name='ide0-1-0'/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>
<controller type='usb' index='0' model='piix3-uhci'>
<alias name='usb'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
<alias name='pci.0'/>
</controller>
<controller type='ide' index='0'>
<alias name='ide'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='virtio-
<alias name='virtio-
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</controller>
<interface type='bridge'>
<mac address=
<source bridge=
<bandwidth>
<inbound average='256000' peak='256000'/>
<outbound average='256000' peak='256000'/>
</bandwidth>
<target dev='vnet8'/>
<model type='virtio'/>
<link state='up'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/4'/>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/4'>
<source path='/dev/pts/4'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<channel type='unix'>
<source mode='bind' path='/
<target type='virtio' name='org.
<alias name='channel0'/>
<address type='virtio-
</channel>
<input type='tablet' bus='usb'>
<alias name='input0'/>
<address type='usb' bus='0' port='1'/>
</input>
<input type='mouse' bus='ps2'>
<alias name='input1'/>
</input>
<input type='keyboard' bus='ps2'>
<alias name='input2'/>
</input>
<graphics type='vnc' port='5904' autoport='yes' listen=
<listen type='address' address=
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1' primary='yes'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<watchdog model='i6300esb' action='none'>
<alias name='watchdog0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</watchdog>
<memballoon model='none'/>
</devices>
<seclabel type='dynamic' model='dac' relabel='yes'>
<label>
<imagelabel
</seclabel>
</domain>
affects: | ubuntu → libvirt (Ubuntu) |
Changed in libvirt (Fedora): | |
importance: | Unknown → Low |
status: | Unknown → Confirmed |
Changed in libvirt (Fedora): | |
status: | Confirmed → In Progress |
Changed in libvirt (Fedora): | |
status: | In Progress → Unknown |
Description of problem:
state of cdrom tray is not updated (changed to 'closed') when resetting a VM, but the internal tray state in qemu is actually changed to 'closed' without emission of the tray-changed event.
Version-Release number of selected component (if applicable):
6.2.0/upstream
How reproducible:
always
Steps to Reproduce:
1. boot VM with cdrom
2. issue 'eject' in the guest OS on the cdrom
3. virsh reset VM
4. check tray state in qemu and in libvirt:
Actual results:
$ virsh dumpxml upstream | grep tray command --hmp upstream info block libvirt/ images/ systemrescuecd- amd64-6. 1.2.iso (raw, read-only)
<target dev='sda' bus='scsi' tray='open'/>
$ virsh qemu-monitor-
libvirt-3-format: /var/lib/
Attached to: ide0-0-0
Removable device: locked, tray closed
Cache mode: writeback
libvirt-2-format: /tmp/blocktest/ cd.iso (raw, read-only)
Attached to: scsi0-0-0
Removable device: not locked, tray open
Cache mode: writeback
$ virsh reset upstream
Domain upstream-bj was reset
$ virsh dumpxml upstream | grep tray command --hmp upstream info block libvirt/ images/ systemrescuecd- amd64-6. 1.2.iso (raw, read-only)
<target dev='sda' bus='scsi' tray='open'/>
$ virsh qemu-monitor-
libvirt-3-format: /var/lib/
Attached to: ide0-0-0
Removable device: not locked, tray closed
Cache mode: writeback
libvirt-2-format: /tmp/blocktest/ cd.iso (raw, read-only)
Attached to: scsi0-0-0
Removable device: not locked, tray closed
Cache mode: writeback
Expected results:
Tray state in the XML matches the tray state in qemu.
Additional info:
Same situation happens on 'reboot' initiated from the guest OS.