mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
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.
This commit is contained in:
parent
627f489e5d
commit
79edca277a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user