Comment 25 for bug 1930398

Revision history for this message
In , hhan (hhan-redhat-bugs) wrote :

tested on qemu v8.10.0-87-ga2ae3d299c and qemu-kvm-7.1.0-6.el9.x86_64
1. Start VM and then eject the CDROM in guest. Check the tray status:
# virsh qemu-monitor-command rhel-9.2 --hmp info block
libvirt-2-format: /var/lib/libvirt/images/rhel-9.2.qcow2 (qcow2)
    Attached to: /machine/peripheral/virtio-disk0/virtio-backend
    Cache mode: writeback

libvirt-1-format: /var/lib/libvirt/images/boot.iso (raw, read-only)
    Attached to: scsi0-0-0-2
    Removable device: not locked, tray open
    Cache mode: writeback

2. Reboot the VM by guest, `virsh reset`, `virsh reboot`. Then check the tray status:
# virsh qemu-monitor-command rhel-9.2 --hmp info block
libvirt-2-format: /var/lib/libvirt/images/rhel-9.2.qcow2 (qcow2)
    Attached to: /machine/peripheral/virtio-disk0/virtio-backend
    Cache mode: writeback

libvirt-1-format: /var/lib/libvirt/images/boot.iso (raw, read-only)
    Attached to: scsi0-0-0-2
    Removable device: locked, tray closed
    Cache mode: writeback

The tray status is reset to locked, tray closed.
However, no tray-change event is emitted. Expect to emit the tray-change event with the reason TRAY_CLOSE.