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:
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.