0

So my host system is Windows 10, and I prepared guest Ubuntu 18.04 system via Hyper-V, this was setting for React Native development, but when I tried starting up Android Emulator I got an error, that my system (guest Ubuntu) can not run it, because it doesn't have KVM and doesn't support VT-X or amd-v.

So I got stuck to either scramble everything and set it up in my host system, use my real phone for troubleshooting (its another issue I haven't come around to - how do you use usb devices on guest ubuntu) or somehow fix it.

Can someone help me with this?

4
  • Are you trying to run a KVM of Android on Ubuntu, which is a guest on Windows 10? Apr 24, 2020 at 13:20
  • @CStafford-14, yep
    – Eugene
    Apr 24, 2020 at 13:41
  • not sure if windows passes the VMX flags and can handle the nesting well. Do you have "vmx" in /proc/cpuinfo inside your Ubuntu guest? That would be (the top level) cpu feature it needs to spawn another level of virtualization. Apr 27, 2020 at 9:00
  • @ChristianEhrhardt, I actually found solution to this, it is possible to make nesting VM, will post it as answer to this.
    – Eugene
    Apr 27, 2020 at 14:55

1 Answer 1

2

You can just turn on nested virtualisation in Windows 10, which will make your VM have its own KVM, obviously before enabling this, be sure your hardware can support and take it (I had i9-9900k & 32GB RAM, and it worked fine, though my guest VM took about 15GB of RAM to run, I used it for Android Emulator)

Here is how you enable it in Windows 10: 1) Run your PowerShell as administrator

2) Test if your CPU supports it, with this command (where vm_name is the name of your virtual machine, in hyper-v): Get-VMProcessor -VMName vm_name | fl *

You should see this line: ExposeVirtualizationExtensions: False

3) Before running next command turn off your VM. To enable nested KVM run (in powershell): Set-VMProcessor -VMName vm_name -ExposeVirtualizationExtensions $true

(where vm_name is the name of your virtual machine, in hyper-v)

And thats it. You can learn about this in a bit more details here: https://www.nakivo.com/blog/hyper-v-nested-virtualization-explained/

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .