qemu_change_media
Swap the medium in a QEMU removable drive, such as a CD-ROM, without rebooting the VM.
Instructions
Swap the medium in a removable drive (e.g. a CD-ROM) without rebooting.
device is the block backend's id or QOM path, as shown by qemu_qmp(name, "query-block")'s "qdev" field - qemu-mcp can't guess it for you, since it depends on the machine type/QEMU version and whether the drive was given an explicit id (qemu_boot's iso/disk params don't set one). path must already exist. format defaults to auto-probing the new image. force=True ejects even a drive the guest has locked (its tray "closed" on the medium); the default refuses in that case instead of surprising the guest. Wraps QMP blockdev-change-medium.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| path | Yes | ||
| force | No | ||
| device | Yes | ||
| format | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |