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 using Hyper - V Manager

    in Windows 10 Gaming
    Virtual Machine using Hyper - V Manager: Hi,I made a Virtual Machine using Hyper-V Manager with VHD attached that is running XP. I do get this message when I start up it up from the image I attached. I was told to add XP IDE files that I extracted. My question is: Will I need to attach these files to the VHD for it...
  3. limited connection in Hyper-V virtual machine

    in Windows 10 Software and Apps
    limited connection in Hyper-V virtual machine: hello, i am configuring a windows xp virtual machine for the purpose of a research, but there is no internet I don't understand much about hyper-v, here are some screenshots. the message I get is: This connection has limited or no connectivity appears. appreciatein portuguese...
  4. limited connection in Hyper-V virtual machine

    in Windows 10 Customization
    limited connection in Hyper-V virtual machine: hello, i am configuring a windows xp virtual machine for the purpose of a research, but there is no internet I don't understand much about hyper-v, here are some screenshots. the message I get is: This connection has limited or no connectivity appears. appreciatein portuguese...
  5. Hyper-V virtual machine very slow to start? Speed-up Hyper-V virtual machine!

    in Windows 10 News
    Hyper-V virtual machine very slow to start? Speed-up Hyper-V virtual machine!: [ATTACH]If you have installed Windows 11 in Hyper-V, but the virtual machine is very slow to start, here are some tweaks that might speed it up. Although several things are responsible for this slowness, these common changes might be handy for you. Whether you have installed...
  6. 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...
  7. 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:...
  8. 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....
  9. 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...
  10. 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...