mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 09:55:18 +00:00
qemu: domain: raise an error when no emulator is found
$ cat f | grep -e arch -e emulator <type arch='mipsel'>hvm</type> $ sudo virsh define f error: Failed to define domain from f error: An error occurred, but the cause is unknown After: $ sudo virsh define f error: Failed to define domain from f error: unsupported configuration: No emulator found for arch 'mipsel' Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
66d4fd7009
commit
97cafa610e
@ -4687,8 +4687,12 @@ qemuDomainDefPostParseBasic(virDomainDefPtr def,
|
|||||||
/* check for emulator and create a default one if needed */
|
/* check for emulator and create a default one if needed */
|
||||||
if (!def->emulator) {
|
if (!def->emulator) {
|
||||||
if (!(def->emulator = virQEMUCapsGetDefaultEmulator(
|
if (!(def->emulator = virQEMUCapsGetDefaultEmulator(
|
||||||
driver->hostarch, def->os.arch)))
|
driver->hostarch, def->os.arch))) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
_("No emulator found for arch '%s'"),
|
||||||
|
virArchToString(def->os.arch));
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user