After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732680 - 'host-passthrough' not supported on non-VT
'host-passthrough' not supported on non-VT
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-07-03 12:17 UTC by Zeeshan Ali
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vm-configurator: Explicitly assign host cpu model (2.38 KB, patch)
2014-07-04 14:08 UTC, Zeeshan Ali
none Details | Review
build: Require libvirt-gconfig >= 0.1.9 (731 bytes, patch)
2014-07-04 14:13 UTC, Zeeshan Ali
none Details | Review
vm-configurator: Explicitly assign host cpu model (2.43 KB, patch)
2014-07-16 11:26 UTC, Zeeshan Ali
committed Details | Review
build: Require libvirt-gconfig >= 0.1.9 (796 bytes, patch)
2014-07-16 11:35 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2014-07-03 12:17:18 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
Comment 1 Zeeshan Ali 2014-07-04 14:08:52 UTC
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."
Comment 2 Zeeshan Ali 2014-07-04 14:09:59 UTC
(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.
Comment 3 Zeeshan Ali 2014-07-04 14:13:09 UTC
Created attachment 279914 [details] [review]
build: Require libvirt-gconfig >= 0.1.9

This should come before the previous patch.
Comment 4 Zeeshan Ali 2014-07-16 11:26:52 UTC
Created attachment 280801 [details] [review]
vm-configurator: Explicitly assign host cpu model

v2: Uses the changed (proposed) API in libvirt-glib.
Comment 5 Lasse Schuirmann 2014-07-16 11:31:07 UTC
Review of attachment 279914 [details] [review]:

Maybe a short note why we require this?
Comment 6 Zeeshan Ali 2014-07-16 11:35:46 UTC
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.
Comment 7 Lasse Schuirmann 2014-07-16 11:37:34 UTC
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.
Comment 8 Lasse Schuirmann 2014-07-16 11:38:21 UTC
Review of attachment 280804 [details] [review]:

looks good for me.
Comment 9 Zeeshan Ali 2014-07-16 11:41:32 UTC
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. :)
Comment 10 Lasse Schuirmann 2014-07-16 11:43:39 UTC
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 :)
Comment 11 Zeeshan Ali 2014-08-01 09:15:26 UTC
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