diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 09f30c40e7..501c7df048 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9767,6 +9767,14 @@ qemuBuildCommandLine(virConnectPtr conn, continue; } + /* PowerPC pseries based VMs do not support floppy device */ + if ((disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY) && + ARCH_IS_PPC64(def->os.arch) && STRPREFIX(def->os.machine, "pseries")) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("PowerPC pseries machines do not support floppy device")); + goto error; + } + switch (disk->device) { case VIR_DOMAIN_DISK_DEVICE_CDROM: bootindex = bootCD; diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy-pseries.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy-pseries.args new file mode 100644 index 0000000000..6f6812184e --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy-pseries.args @@ -0,0 +1,6 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-ppc64 -S -M pseries -m 214 -smp 1 -nographic -monitor \ +unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb -drive \ +file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0 -drive \ +file=/dev/fd0,if=floppy,unit=0 -drive file=/tmp/firmware.img,if=floppy,unit=1 \ +-net none -serial none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy-pseries.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy-pseries.xml new file mode 100644 index 0000000000..be0ede6bdd --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy-pseries.xml @@ -0,0 +1,41 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + + + + +
+ + + + + +
+ + + + + +
+ + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f9b30d9781..afd2ef3a98 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -737,6 +737,7 @@ mymain(void) QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_VIRTIO_TX_ALG); DO_TEST("disk-cdrom-tray-no-device-cap", NONE); DO_TEST("disk-floppy", NONE); + DO_TEST_FAILURE("disk-floppy-pseries", QEMU_CAPS_DRIVE); DO_TEST("disk-floppy-tray-no-device-cap", NONE); DO_TEST("disk-floppy-tray", QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE);