diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index ec69a24a39..9fa7747a01 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2258,14 +2258,6 @@ qemuBuildDiskDriveCommandLine(virCommandPtr cmd, qemuDomainSecretInfoPtr secinfo = diskPriv->secinfo; qemuDomainSecretInfoPtr encinfo = diskPriv->encinfo; - /* PowerPC pseries based VMs do not support floppy device */ - if (disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY && - qemuDomainIsPSeries(def)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("PowerPC pseries machines do not support floppy device")); - return -1; - } - if (disk->info.bootIndex) { bootindex = disk->info.bootIndex; } else { diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index bde3ba462a..d8b7212823 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4586,7 +4586,8 @@ qemuProcessStartValidateDisks(virDomainObjPtr vm, size_t i; for (i = 0; i < vm->def->ndisks; i++) { - virStorageSourcePtr src = vm->def->disks[i]->src; + virDomainDiskDefPtr disk = vm->def->disks[i]; + virStorageSourcePtr src = disk->src; /* This is a best effort check as we can only check if the command * option exists, but we cannot determine whether the running QEMU @@ -4599,6 +4600,14 @@ qemuProcessStartValidateDisks(virDomainObjPtr vm, "QEMU binary")); return -1; } + + /* PowerPC pseries based VMs do not support floppy device */ + if (disk->device == VIR_DOMAIN_DISK_DEVICE_FLOPPY && + qemuDomainIsPSeries(vm->def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("PowerPC pseries machines do not support floppy device")); + return -1; + } } return 0;