Bug 1214592 - Switching between kvm and plain qemu is not possible in v1.x
Summary: Switching between kvm and plain qemu is not possible in v1.x
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: arm
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-23 07:18 UTC by Pavel Fedin
Modified: 2015-09-29 00:01 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-14 23:31:42 UTC


Attachments (Terms of Use)

Description Pavel Fedin 2015-04-23 07:18:46 UTC
Description of problem:

In virt-manager v0.9 it was possible to switch between qemu (interpreter
mode) and KVM when creating new ARM virtual machine. In v1 this possibility is gone, and it always attempts to create KVM-based machine. This is bad because not everything can be done with KVM. The limitation of KVM is that guest CPU should be the same as host one. For example, i cannot run ARMv5 guest (like Integrator) on Cortex-A15 host using KVM. This gets especially nasty because virt-manager attempts to instantly run just created machine, and if running fails (it does in this case) it simply refuses to create it, so that i cannot use virsh in order to fix it up.
 There is still "Virtualization type" selector widget, but it is hidden if there is only one choice. For testing purposes i tried to force-enable it, and it lists only 'qemu'. virt-manager somehow substitutes this with "kvm"
by itself.
 Can old behavior (choice between "kvm" and "qemu" variants) be restored ?


Version-Release number of selected component (if applicable): 1.1.0 (built from GIT HEAD)


Steps to Reproduce:
1. Press "New virtual machine" button in order to run the wizard
2. See the first page.

Actual results:

 "Hypervisor type" selector is not shown. If i patch the source code to always show it, it will list only "qemu". But actually "kvm" type will be created.


Expected results:

 Choice between "qemu" and "kvm", as it was in v0.9

Additional info:

 None

Comment 1 Cole Robinson 2015-09-14 23:31:42 UTC
Thanks for the report, fixed upstream now:

commit d896dd73472bc7f57a07d381e392234da6e1184c
Author: Cole Robinson <crobinso>
Date:   Mon Sep 14 18:31:56 2015 -0400

    create: Allow switching between KVM and TCG for armv7l (bz 1214592)
    
    Otherwise we tried to always force KVM which reduces the usefulness
    here. We still get the defaults right though
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1214592

Comment 2 Pavel Fedin 2015-09-24 09:22:16 UTC
 Thank you very much, but i have a small question. Why restrict this feature only to ARM ? It is very useful to be able to create TCG machines for the rest of architectures, at least for purposes of developing and testing qemu itself.

Comment 3 Cole Robinson 2015-09-24 12:48:30 UTC
(In reply to Pavel Fedin from comment #2)
>  Thank you very much, but i have a small question. Why restrict this feature
> only to ARM ? It is very useful to be able to create TCG machines for the
> rest of architectures, at least for purposes of developing and testing qemu
> itself.

There's some subtlety here so let me define some things

new arm behavior: Always show TCG, show KVM if available
old arm behavior: If KVM available, show only KVM, otherwise show only TCG

The commit message is a bit misleading: we only use the old behavior for the following archs: "i686", "x86_64", "aarch64", "ppc64", "ppc64le". All other archs get the new behavior

While TCG is always a valid option, there's downsides to showing it in the UI:

1) Inexperienced users might accidentally select it
2) Bugs might mean we select it by default and users unexpectedly get slow VMs that are hard to debug

For the specific archs I blacklisted, here's the breakdown:

- x86: Users _never_ want tcg if KVM is available, except if trying to debug KVM issues. In which case they can go to the command line
- aarch64: virt is the only valid target at this point, and if KVM is available you want to use it. similarly maybe for testing you want to try TCG but again the command line is an option
- ppc64: Pretty sure pseries is really the only target people want here, and again if KVM is available they want to use it

So IMO this is fine. If people have specific needs to enable tcg for those other architectures that isn't working around bugs, I'll evaluate them at that time.

Comment 4 Pavel Fedin 2015-09-24 13:44:24 UTC
May be then remove aarch64 from the blacklist? aarch64-system-qemu can also run ARM32 guests, so everything that applies to armv7l automatically applies to aarch64.

Comment 5 Cole Robinson 2015-09-29 00:01:02 UTC
(In reply to Pavel Fedin from comment #4)
> May be then remove aarch64 from the blacklist? aarch64-system-qemu can also
> run ARM32 guests, so everything that applies to armv7l automatically applies
> to aarch64.

Okay I enabled it for aarch64 as well:

commit b45a0ce2867f2ae4fb28c27c31c49dc30175db7b
Author: Cole Robinson <crobinso>
Date:   Mon Sep 28 20:00:01 2015 -0400

    create: Show TCG vs KVM for aarch64 too
    
    Since it can be used for arm32 installs as well.
    
    Requested here; https://bugzilla.redhat.com/show_bug.cgi?id=1214592#c4


Note You need to log in before you can comment on or make changes to this bug.