libvirt/0004-qemu-x86_64-is-good-enough-for-i686.patch

54 lines
2.5 KiB
Diff
Raw Normal View History

From cd1b72fdd821d1fb4d08198833ea782651760e01 Mon Sep 17 00:00:00 2001
Message-Id: <cd1b72fdd821d1fb4d08198833ea782651760e01.1414680021.git.crobinso@redhat.com>
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Thu, 16 Oct 2014 21:28:00 +0200
Subject: [PATCH 4/5] qemu: x86_64 is good enough for i686
virt-manager on Fedora sets up i686 hosts with "/usr/bin/qemu-kvm" emulator,
which in turn unconditionally execs qemu-system-x86_64 querying capabilities
then fails:
Error launching details: invalid argument: architecture from emulator 'x86_64' doesn't match given architecture 'i686'
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/engine.py", line 748, in _show_vm_helper
details = self._get_details_dialog(uri, vm.get_connkey())
File "/usr/share/virt-manager/virtManager/engine.py", line 726, in _get_details_dialog
obj = vmmDetails(conn.get_vm(connkey))
File "/usr/share/virt-manager/virtManager/details.py", line 399, in __init__
self.init_details()
File "/usr/share/virt-manager/virtManager/details.py", line 784, in init_details
domcaps = self.vm.get_domain_capabilities()
File "/usr/share/virt-manager/virtManager/domain.py", line 518, in get_domain_capabilities
self.get_xmlobj().os.machine, self.get_xmlobj().type)
File "/usr/lib/python2.7/site-packages/libvirt.py", line 3492, in getDomainCapabilities
if ret is None: raise libvirtError ('virConnectGetDomainCapabilities() failed', conn=self)
libvirtError: invalid argument: architecture from emulator 'x86_64' doesn't match given architecture 'i686'
Journal:
Oct 16 21:08:26 goatlord.localdomain libvirtd[1530]: invalid argument: architecture from emulator 'x86_64' doesn't match given architecture 'i686'
(cherry picked from commit afe8f4200f6e80d2510731165dd2cdae741bd9fb)
---
src/qemu/qemu_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index e873d45..d379c1f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17572,7 +17572,8 @@ qemuConnectGetDomainCapabilities(virConnectPtr conn,
arch_from_caps = virQEMUCapsGetArch(qemuCaps);
- if (arch_from_caps != arch) {
+ if (arch_from_caps != arch &&
+ (arch_from_caps != VIR_ARCH_X86_64 || arch != VIR_ARCH_I686)) {
virReportError(VIR_ERR_INVALID_ARG,
_("architecture from emulator '%s' doesn't "
"match given architecture '%s'"),
--
2.1.0