When running under KVM, the arch is usually set to i686 because
the name of the emulator is not qemu-system-x86_64. Use the host
arch instead.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
path = def->emulator;
else
path = strstr(def->emulator, "qemu");
- if (path &&
- STRPREFIX(path, "qemu-system-"))
+ if (def->virtType == VIR_DOMAIN_VIRT_KVM)
+ def->os.arch = strdup(caps->host.cpu->arch);
+ else if (path &&
+ STRPREFIX(path, "qemu-system-"))
def->os.arch = strdup(path + strlen("qemu-system-"));
else
def->os.arch = strdup("i686");