Configuring KVM inside Ubuntu Hyper-V client

7,227

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.
Share:
7,227

Related videos on Youtube

TheEdge
Author by

TheEdge

Updated on September 18, 2022

Comments

  • TheEdge
    TheEdge over 1 year

    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.

    • Daniel B
      Daniel B almost 6 years
      With nested virtualization, your options are very limited. Try VMware Player or Workstation (trial versions are available).
  • datafiddler
    datafiddler about 5 years
    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