qemu-server/PVE
Friedrich Weber 2e2f8cb7a3 print drive commandline: die if drive with ISO sets no explicit media
The `media` option defaults to `disk` if not present, which attaches
the drive read-write. This can be unexpected for ISO volumes. Hence,
when constructing the QEMU command line, require that drives with ISO
volumes explicitly set `media` and die if this is not the case.

This breaks VM start and live-migration if such a drive is present,
and hotplug for such drives. Users can fix this by editing the VM
config to set `media` explicitly.

Also add a cfg2cmd test for the error.

Suggested-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
2025-04-04 15:41:54 +02:00
..
API2 allow non-root users to set /dev/hwrng as an RNG source 2025-04-04 10:25:33 +02:00
CLI vm stop-cleanup: allow callers to decide error behavior 2025-03-06 16:33:14 +01:00
QemuConfig config: make attempts at writing out NoWrite configs fatal 2025-02-18 15:06:04 +01:00
QemuServer add helpers for VirtIO RNG command line arguments 2025-04-04 10:25:33 +02:00
VZDump vzdump: align behavior for vma backup with PBS backup for templates 2025-02-18 15:06:04 +01:00
Makefile config: add special class that prevents writing the configuration 2025-02-18 15:06:04 +01:00
QemuConfig.pm config: add special class that prevents writing the configuration 2025-02-18 15:06:04 +01:00
QemuMigrate.pm migrate: add transfer summary 2025-04-03 16:40:59 +02:00
QemuServer.pm print drive commandline: die if drive with ISO sets no explicit media 2025-04-04 15:41:54 +02:00
QMPClient.pm tree-wide: fix various typos in comments 2024-12-05 12:33:24 +01:00