提交 79edca27 编写于 作者: P Peter Krempa

qemu: command: Move PPC fdc check to domain validation

Apart from not littering the command line generator, the added benefit
is that new configs with a FDC will be rejected at define stage.
上级 627f489e
......@@ -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 {
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册