Is it possible to run KVM on an Ubuntu 18.04 guest in Hyper-V on Windows 10? Or any other hypervisor inside the guest?

After installing KVM I run:

sudo kvm-ok

and it tells me my CPU does not support KVM extensions.

And to foreshadow: "Why are you trying to run a hypervisor inside a hypervisor.... I want to play with https://hypercontainer.io and don't have a bare metal Linux machine to play with.

  • With nested virtualization, your options are very limited. Try VMware Player or Workstation (trial versions are available). – Daniel B Jun 11 '18 at 8:28

The article Running KVM Nested in Microsoft Hyper-V reports this procedure :

  1. Download this PowerShell script from Github (written by Microsoft)
  2. Copy the script to your desktop
  3. Open up an elevated PowerShell instance
  4. Change current folder to the location of the PowerShell Script
  5. Run the following command to allow for script execution in Powershell

    Set-ExecutionPolicy Bypass
  6. Run .\nameofscript.ps1 name-of-linux-vm-in-hyper-v

  7. If all goes well it should prompt you asking if you want to expose Virtualization Extensions. Answer Yes, also enable any other additions as you wish.
  8. After the script completes, boot the VM in Hyper-V and you should now have access to the virtualization extensions required for KVM/XEN.
| improve this answer | |
  • I agreed to shut down the HVMachine, enlarge RAM to 4GB, and all seemed fine, but after restarting the VM, it still says. INFO: Your CPU does not support KVM extensions KVM acceleration can NOT be used – datafiddler Apr 16 '19 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.