GNOME Bugzilla – Bug 732680
'host-passthrough' not supported on non-VT
Last modified: 2016-03-31 13:22:07 UTC
Upstream bug for https://bugzilla.redhat.com/show_bug.cgi?id=1115959 $ gnome-boxes --checks • The CPU is capable of virtualization: no • The KVM module is loaded: no • Libvirt KVM guest available: no • Boxes storage pool available: yes • The SELinux context is default: yes Report bugs to <https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-boxes>. Boxes home page: <http://live.gnome.org/Boxes>. [mikhail@localhost ~]$ G_MESSAGES_DEBUG=Boxes gnome-boxes (gnome-boxes:3291): Boxes-DEBUG: libvirt-system-importer.vala:45: Connected to system libvirt, now fetching domains.. (gnome-boxes:3291): Boxes-DEBUG: libvirt-system-importer.vala:49: Fetched 0 domains from system libvirt. (gnome-boxes:3291): Boxes-DEBUG: wizard-source.vala:250: No boxes to import (gnome-boxes:3291): Boxes-DEBUG: util-app.vala:256: check_cpu_vt_capability: no (gnome-boxes:3291): Boxes-DEBUG: util-app.vala:276: check_module_kvm_loaded: no (gnome-boxes:3291): Boxes-DEBUG: libvirt-machine.vala:111: new libvirt machine: boxes-unknown (gnome-boxes:3291): Boxes-DEBUG: machine.vala:61: State of 'Windows 7 Ultim x86 Ru nBook IE11 by OVGorskiy 11' changed to BOXES_MACHINE_MACHINE_STATE_STOPPED (gnome-boxes:3291): Boxes-DEBUG: machine.vala:579: connect display failed: Unable to start domain: unsupported configuration: CPU mode 'host-passthrough' is only supported with kvm
Created attachment 279913 [details] [review] vm-configurator: Explicitly assign host cpu model Instead of using 'host-passthrough' mode, use custom mode and set the model of CPU explicitly to that of the host CPU. While 'host-model' mode still has issues and should be avoided, turns out that 'host-passthrough' does not work for non-KVM. This patch follows the advice given in libvirt documentation. From http://libvirt.org/formatdomain.html#elementsCPU "Beware, due to the way libvirt detects host CPU and due to the fact libvirt does not talk to QEMU/KVM when creating the CPU model, CPU configuration created using host-model may not work as expected. The guest CPU may differ from the configuration and it may also confuse guest OS by using a combination of CPU features and other parameters (such as CPUID level) that don't work. Until these issues are fixed, it's a good idea to avoid using host-model and use custom mode with just the CPU model from host capabilities XML."
(In reply to comment #1) > Created an attachment (id=279913) [details] [review] > vm-configurator: Explicitly assign host cpu model This patch requires new libvirt-glib API that is pending reviews.
Created attachment 279914 [details] [review] build: Require libvirt-gconfig >= 0.1.9 This should come before the previous patch.
Created attachment 280801 [details] [review] vm-configurator: Explicitly assign host cpu model v2: Uses the changed (proposed) API in libvirt-glib.
Review of attachment 279914 [details] [review]: Maybe a short note why we require this?
Created attachment 280804 [details] [review] build: Require libvirt-gconfig >= 0.1.9 We'll need the latest version to make use of new CPU model API.
Review of attachment 280801 [details] [review]: ::: src/vm-configurator.vala @@ +211,3 @@ var cpu = new DomainCpu (); // Ideally we should be using 'host-model' but there is currently issues with that: // https://bugzilla.redhat.com/show_bug.cgi?id=870071 Maybe include a link to http://libvirt.org/formatdomain.html#elementsCPU also here so you don't have to git blame to get more info.
Review of attachment 280804 [details] [review]: looks good for me.
Review of attachment 280801 [details] [review]: ::: src/vm-configurator.vala @@ +211,3 @@ var cpu = new DomainCpu (); // Ideally we should be using 'host-model' but there is currently issues with that: // https://bugzilla.redhat.com/show_bug.cgi?id=870071 whats wrong with digging into git history? The knowledge that is immediately needed is provided in the comment and link to all the details on the issue being worked around is also provided. I don't think we need to provide links to API docs where we use them. :)
Review of attachment 280801 [details] [review]: ::: src/vm-configurator.vala @@ +211,3 @@ var cpu = new DomainCpu (); // Ideally we should be using 'host-model' but there is currently issues with that: // https://bugzilla.redhat.com/show_bug.cgi?id=870071 you know I'm usually rather worried about underdocumenting than overdocumenting. Thats why there is a maybe :), so go your style, the patch is good for me :)
Attachment 280801 [details] pushed as 36c2f96 - vm-configurator: Explicitly assign host cpu model Attachment 280804 [details] pushed as 3f82458 - build: Require libvirt-gconfig >= 0.1.9