mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45: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 */
|
||||
if (!def->emulator) {
|
||||
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 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user