QA:Testcase KVM nested virt

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(Create page)
 
(add instructions how to check for nested virt support in host and enable it if needed)
 
(3 intermediate revisions by one user not shown)
Line 5: Line 5:
  
 
|setup=
 
|setup=
Virt capable host, F19+ VM and F19+ host.
+
Virt capable host, latest Fedora VM and latest Fedora host.
  
 
|actions=
 
|actions=
 
+
<ol>
# Start with a shutoff VM
+
<li> Check whether your host system supports nested virtualization. For Intel processors, look into <code>/sys/module/kvm_intel/parameters/nested</code>, for AMD processors into <code>/sys/module/kvm_amd/parameters/nested</code>. You should receive <code>1</code> or <code>Y</code>, if nested virt is supported, <code>0</code> or <code>N</code> otherwise. AMD processors should have it enabled by default, (certain) Intel processors might not. Example:
# Open virt-manager, go to the VM details page for that VM.
+
<pre>$ cat /sys/module/kvm_intel/parameters/nested
# Click on the CPU page.
+
Y</pre>
# Click 'Copy host cpu', then 'Apply'
+
<li> If your host system does not have nested virt enabled (most probably just Intel case), try to enable it by booting with <code>kvm-intel.nested=1</code> argument on the kernel command line and check it again. Now you should be enabled.
# Start the VM
+
<li> Make sure your VM is shut down
# Inside the VM, do <code>sudo yum groupinstall virtualization</code>
+
<li> Open virt-manager, go to the VM details page for that VM.
# Verify that the guest has virt correctly setup with: <code>sudo virt-host-validate</code>
+
<li> Click on the CPU page.
 
+
<li> In the CPU model field, type 'host-passthrough', click Apply
=== Additional info and tests ===
+
<li> Start the VM
 
+
<li> Inside the VM, do <code>sudo yum groupinstall virtualization</code>
If you're using an Intel processor:
+
<li> Verify that the guest has virt correctly setup with: <code>sudo virt-host-validate</code>
* For Fedora-19 -- https://github.com/kashyapc/nvmx-haswell/blob/master/SETUP-nVMX.rst
+
</ol>
* http://kashyapc.wordpress.com/2013/02/12/nested-virtualization-with-kvm-and-intel-on-fedora-18/
+
* http://kashyapc.wordpress.com/2012/01/14/nested-virtualization-with-kvm-intel/
+
 
+
If you're using an AMD processor:
+
* http://kashyapc.wordpress.com/2012/01/18/nested-virtualization-with-kvm-and-amd/
+
  
 
|results=
 
|results=
No obvious errors occur.
+
# No obvious errors occur.
 +
# <code>sudo virt-host-validate</code> should return <code>PASS</code> for all checks.
 
}}
 
}}
  
 
[[Category:Virtualization Test Cases]]
 
[[Category:Virtualization Test Cases]]

Latest revision as of 16:35, 19 June 2015

Contents

Description

Configure an existing VM to allow nested virtualization: running performant VMs inside another VM, with access to the host's virtualization extensions.

Setup

Virt capable host, latest Fedora VM and latest Fedora host.

How to test

  1. Check whether your host system supports nested virtualization. For Intel processors, look into /sys/module/kvm_intel/parameters/nested, for AMD processors into /sys/module/kvm_amd/parameters/nested. You should receive 1 or Y, if nested virt is supported, 0 or N otherwise. AMD processors should have it enabled by default, (certain) Intel processors might not. Example:
    $ cat /sys/module/kvm_intel/parameters/nested
    Y
  2. If your host system does not have nested virt enabled (most probably just Intel case), try to enable it by booting with kvm-intel.nested=1 argument on the kernel command line and check it again. Now you should be enabled.
  3. Make sure your VM is shut down
  4. Open virt-manager, go to the VM details page for that VM.
  5. Click on the CPU page.
  6. In the CPU model field, type 'host-passthrough', click Apply
  7. Start the VM
  8. Inside the VM, do sudo yum groupinstall virtualization
  9. Verify that the guest has virt correctly setup with: sudo virt-host-validate

Expected Results

  1. No obvious errors occur.
  2. sudo virt-host-validate should return PASS for all checks.