
On Tue, Oct 21, 2014 at 01:33:00PM +0200, Martin Kletzander wrote:
On Thu, Oct 16, 2014 at 09:28:00PM +0200, Lubomir Rintel wrote:
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' --- 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 7377320..e4b2b6c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17809,7 +17809,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)) {
You haven't ran make syntax-check, otherwise it would tell you there's tab with 4 spaces after that and we use spaces only.
It would be nice to add a test case for this particular case. Anyway ACK, I'll push it in a while with that line fixed.
However, I wonder if we only limit the 32/64 bit machines by the processor, because it looks like one can run even the following combination:
qemu-system-i686 -cpu Haswell
And this is even with <type arch='x86_64' machine='pc-q35-2.2'>! Is this still 64bit cpu running in 32bit mode?
If libvirt / qemu allows you to request <type arch=x86_64> when pointing <emulator> to the i686 system emulator binary that is a bug IMHO. We should reject nonsensical combinations like that. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|