Windows 10: Hyper-V Nested Virtualization: Run virtual machines on virtual machine

Discus and support Hyper-V Nested Virtualization: Run virtual machines on virtual machine in Windows 10 Tutorials to solve the problem; How to: Hyper-V Nested Virtualization: Run virtual machines on virtual machine [img] Information Nested Virtualization means that user can enable... Discussion in 'Windows 10 Tutorials' started by Brink, Jul 17, 2018.

  1. Brink Win User

    Hyper-V Nested Virtualization: Run virtual machines on virtual machine


    How to: Hyper-V Nested Virtualization: Run virtual machines on virtual machine

    Hyper-V Nested Virtualization: Run virtual machines on virtual machine [​IMG]
    Information Nested Virtualization means that user can enable Hyper-V on existing virtual machines, and run virtual machines and Windows Sandbox on them.

    To make Nested Virtualization to work, it and MAC Address Spoofing or NAT networking must be enabled separately for each first level host VM. The script in this tutorial will use MAC Spoofing.

    Wikipedia:

    To be honest, this is a feature that only interests real virtualization enthusiasts. One practical use is to run emulators or other software that requires regular restarts on a second level nested VM on first level VM, to avoid restarting host.

    I use Nested Virtualization to save current state of Hyper-V Production Checkpoints.

    If you want to enable Hyper-V on your Hyper-V virtual machines, this tutorial shows how to do it with a simple PowerShell script.

    Enable Nested Virtualizationt1) The script to enable Nested Virtualization:

    Code:
    You can download the script from my OneDrive:

    Download

    As always with downloaded content, be sure to unblock downloaded file before using it!

    2) Check that running local scripts in PowerShell is enabled (tutorial):

    Hyper-V Nested Virtualization: Run virtual machines on virtual machine [​IMG]


    3) Be sure the virtual machine on which you want to allow nested virtualization is turned off. Run the script by right clicking it and selecting Run with PowerShell:

    Hyper-V Nested Virtualization: Run virtual machines on virtual machine [​IMG]


    Alternatively, if using PowerShell ISE, open the script from File menu and press F5 to run it:

    Hyper-V Nested Virtualization: Run virtual machines on virtual machine [​IMG]


    4) If PowerShell warns you about Execution Policy change, press Y to accept it:

    Hyper-V Nested Virtualization: Run virtual machines on virtual machine [​IMG]


    5) Running the script, it will auto elevate (switch to admin mode if started in normal user mode), and lists all current Hyper-V virtual machines on your host:

    Hyper-V Nested Virtualization: Run virtual machines on virtual machine [​IMG]


    6) Type or Copy & Paste the name of the virtual machine on which you want to enable nested virtualization, press Enter.

    Hyper-V Nested Virtualization: Run virtual machines on virtual machine [​IMG]
    Tip In PowerShell (and in Command Prompt), you cannot copy using context menu (mouse right click, select Copy). Also, by default Copy & Paste with keyboard shortcuts is disabled, although it can be enabled in PowerShell (and Command Prompt) Properties in Options tab.

    Instead, mark the string you want to copy with mouse, in this case name of a VM. To mark a string, press and hold down mouse left button on top of first character, and move to end of the string you want to copy. Release the mouse button, press Enter to copy.

    Pasting is done with right mouse button.

    Hyper-V Nested Virtualization: Run virtual machines on virtual machine [​IMG]


    7) That's it. Nested virtualization on selected VM is now enabled:

    Hyper-V Nested Virtualization: Run virtual machines on virtual machine [​IMG]


    8) Start the VM, setup Hyper-V on it (tutorial). In screenshot I am running Windows 7 on a Hyper-V VM on Windows 10 Hyper-V VM running on my host computer:

    Hyper-V Nested Virtualization: Run virtual machines on virtual machine [​IMG]

    Happy virtualization, geeks!

    Kari

    :)
     
    Brink, Jul 17, 2018
    #1
  2. Andre Da Costa, Oct 27, 2019
    #2
  3. Pauli O Win User
    Hyper V Import Virtual Machine

    There is separate default folders for Virtual Machines and Virtual Hard Disks

    C:\ProgramData\Microsoft\Windows\Hyper-V

    This folder contains all settings for each Virtual machines.

    Have you changed that folder?

    C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks

    This folder contains only virtual disks. On your case it's changed to E:\HyperV\...

    When you want import VM you need to search it from that first location.

    You can check this location from Hyper-V settings.

    If you can't import existing VM's you can create 3 new Virtual Machines.

    When creating those select option Use existing Virtual Disk and point disks from E:\HyperV\...
     
    Pauli O, Oct 27, 2019
    #3
  4. Hyper-V Nested Virtualization: Run virtual machines on virtual machine

    Hyper V not connecting to virtual machine

    Suddenly, Hyper V would not connect to any Virtual Machine using the Virtual Machine Connection. I trying creating new VMs and nothing worked. I am using Windows 10 Education.
     
    Ricardo_PUPR, Oct 27, 2019
    #4
  5. SarahKong Win User
    SarahKong, Oct 27, 2019
    #5
  6. SarahKong Win User
    Hyper-V Virtual Machine not recognised

    Ok that's why you can't add it... Virtual Machines are stored in a .vhd or .vhdx file. The xml file is used for the VMs but you also have to have a valid vhd

    https://www.altaro.com/hyper-v/hyper-vs-relatio...

    Are you trying to import one you used previously or just trying to create a new VM?
     
    SarahKong, Oct 27, 2019
    #6
Thema:

Hyper-V Nested Virtualization: Run virtual machines on virtual machine

Loading...
  1. Hyper-V Nested Virtualization: Run virtual machines on virtual machine - Similar Threads - Hyper Nested Virtualization

  2. Virtual machine

    in Windows 10 Virtualization
    Virtual machine: I have an Asus z390 board with an SSD and use Windows 10 Pro. I only have 8 GB of RAM and if that is insufficient please tell me up front. I am an average user and have a images of my OS with Macrium. I have watched VM's on YouTube and Oracle Virtual Box seems to be the...
  3. Hyper-V Virtual machine sound not working

    in Windows 10 Drivers and Hardware
    Hyper-V Virtual machine sound not working: I recently found out how to get Hyper-V to work and made a Linux virtual machine with no problem. However, when I want to play any audio on the virtual machine, I can't. No audio will play on the virtual machine. Is there any way that I can fix this?...
  4. Issues with Hyper-V Virtual Machines

    in Windows 10 Network and Sharing
    Issues with Hyper-V Virtual Machines: Hi all, I'm running Ubuntu 19.04 in a Hyper-V Virtual Machine. It's configured to use Hyper-V's "Default Switch" network adapter, but for some reason, the VM doesn't seem to get internet access. My computer is connected to the Internet (both through Wi-Fi and Ethernet). I've...
  5. Virtual Machine

    in Windows 10 Installation and Upgrade
    Virtual Machine: I recently installed Hyper-V on my Lenovo Windows 10 machine and am trying to set up a Virtual Machine. I saw Andre Da Costa's post on Groovypost.com in regards to this. His post was dated January 11, 2019. I have not been able to access the BIOS setup screen, as pictured...
  6. Hyper V- Virtual Machine Error

    in Windows 10 Updates and Activation
    Hyper V- Virtual Machine Error: While starting the Vistual Machine i am facing the below error shown in Event Viewer. Plz Help me out to resolve this problem. License Activation (slui.exe) failed with the following error code: hr=0x8007232B Command-line arguments:...
  7. Hyper V not connecting to virtual machine

    in Windows 10 BSOD Crashes and Debugging
    Hyper V not connecting to virtual machine: Suddenly, Hyper V would not connect to any Virtual Machine using the Virtual Machine Connection. I trying creating new VMs and nothing worked. I am using Windows 10 Education....
  8. Hyper-V - Optimizing Virtual Machines

    in Windows 10 Tutorials
    Hyper-V - Optimizing Virtual Machines: How to: Hyper-V - Optimizing Virtual Machines Running Windows on a virtual machine can naturally never be as fast as same version of Windows on same computer running on physical hardware. However, by tweaking virtual machine settings, you can greatly impact the speed and...
  9. Windows Virtual Machine (Hyper-V) vs. VMware Virtual Machine

    in Windows 10 Virtualization
    Windows Virtual Machine (Hyper-V) vs. VMware Virtual Machine: I have used VMware in the past with limited success though I suspect the hardware limitations had something to do with it. The leaning curve was modest if not at times tedious to confusing at times and I am not particularly looking forward to that again. What can you all tell...
  10. Backing up Hyper-V Virtual Machines

    in Windows 10 Virtualization
    Backing up Hyper-V Virtual Machines: Hi, I was wondering if all I really need to do to backup activated virtual machines but not associated virtual hard drives is just to copy the virtual hard drive folder to another drive (or even one drive) . All I am really interested is in saving the machines which have...