1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
device: 0.972
socket: 0.928
performance: 0.924
vnc: 0.883
VMM: 0.874
peripherals: 0.872
boot: 0.857
kernel: 0.851
network: 0.847
PID: 0.842
ppc: 0.838
TCG: 0.817
risc-v: 0.813
KVM: 0.803
debug: 0.792
hypervisor: 0.771
graphic: 0.760
register: 0.751
files: 0.720
permissions: 0.713
arm: 0.685
architecture: 0.677
x86: 0.668
user-level: 0.660
semantic: 0.623
i386: 0.599
mistranslation: 0.569
virtual: 0.539
assembly: 0.524
eject (monitor command) not work for blockdev cdrom
Description of problem:
cdrom1 device work fine, all files reads, but when i whant to eject CD-ROM disk from device by telnet monitor, it not work.
Steps to reproduce:
1. Connect to monitor with
```
telnet 127.0.0.1 9100
(QEMU 5.2.0 monitor - type 'help' for more information)
```
2. Show block devices
```
info block
cdrom1-format: /mnt/soft/QEMU/Windows VirtIO Drivers/virtio-win-0.1.208-1.iso (raw, read-only)
Attached to: cdrom1
Removable device: not locked, tray closed
Cache mode: writeback
```
3. Send eject commands
```
eject cdrom1
Error: Device 'cdrom1' not found
eject cdrom1-format
Error: Device 'cdrom1-format' not found
eject cdrom1-storage
Error: Device 'cdrom1-storage' not found
```
Additional information:
When i run qemu with next lines (replace -blockdev to -drive):
```
-device ide-cd,bus=ide.1,drive=cdrom1,id=idecd1,bootindex=2
-drive if=none,id=cdrom1,media=cdrom,readonly=on,file="/mnt/soft/QEMU/Windows VirtIO Drivers/virtio-win-0.1.208-1.iso"
```
eject cdrom1 command work fine
```
info block
cdrom1 (#block133): /mnt/soft/QEMU/Windows VirtIO Drivers/virtio-win-0.1.208-1.iso (raw, read-only)
Attached to: idecd1
Removable device: not locked, tray closed
Cache mode: writeback
eject cdrom1
```
Also i found a similar bug description on this link https://bugs.launchpad.net/qemu/+bug/1799766
|