Windows Server Hyper-V Nested Virtualization

Source: Internet
Author: User

Windows Server Hyper-V Nested Virtualization

Before Windows Server 2016 was released, as a dick we had to use VMware Workstation's nested virtualization technology if we wanted to experiment with Hyper-V clusters without having too many physical machines!

But with the release of Windows Server 2016, Microsoft has allowed us to use nested virtualization technology on the Hyper-V platform! Nested virtualization is a feature that allows us to run Hyper-V virtual machines in a Hyper-V virtual machine. In other words, the Hyper-V host itself can be virtualized through the nested virtualization feature of Windows Server 2016.

Nested virtualization technologies for Windows Server 2016 are primarily used in the following scenarios:

1. Run the Hyper-V container in the Virtualization container host.

2. Run the Hyper-V experiment in a virtualized environment.

3. Test multi-machine scenarios without the need for separate hardware

If you want to use nested virtualization technologies for Windows Server 2016, the following prerequisite conditions must be met:

1. Hyper-V host running Windows Server 2016 or Windows 10 anniversary update.

2. Hyper-V VMS running Windows Server 2016 or Windows 10 anniversary update.

3. Configure the Hyper-V VM with version 8.0 or later.

4, the use of vt-x and EPT technology Intel processor.

Attention:

After you turn on nested virtualization technology in Windows Server 2016, the dynamic memory and run-time resizing features will not be available:

When Hyper-V is running in a virtual machine, the virtual machine must be shut down to adjust its memory. This means that even if dynamic memory is enabled, the amount of storage does not fluctuate. For virtual machines that do not have dynamic memory enabled, any attempt to adjust the amount of storage at startup will fail.

After all that talk, let's look at how to configure nested virtualization in Windows Server 2016.

In this experiment I will turn on nested virtualization technology for virtual machine nested:

650) this.width=650; "title=" clip_image002 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image002 "src=" http://s3.51cto.com/wyfs02/M00/89/FB/wKiom1gi8GzQw8tOAABUpHZZUHw767.jpg "height=" 175 "/>

First we run Windowspowershell as an administrator and type the following command:

Get-vmprocessor-vmname Nested | FL

As you can see, the current value of "Exposevirtualizationextensions" is fales, which means that the current virtual machine "Nested" does not have the nested virtualization technology turned on:

650) this.width=650; "title=" clip_image003 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image003 "src=" Http://s3.51cto.com/wyfs02/M01/89/FB/wKiom1gi8G_BCVYhAAE2_ckWL-o000.png "height=" 328 "/>

We will be prompted with the following error when we enable Hyper-V:

650) this.width=650; "title=" clip_image005 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image005 "src=" http://s3.51cto.com/wyfs02/M02/89/FB/wKiom1gi8HCjt-pNAACa5igQw6w422.jpg "height=" 370 "/>

Type the following PS command to enable nested virtualization:

Set-vmprocessor-vmname nested-exposevirtualizationextensions $True

650) this.width=650; "title=" clip_image007 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image007 "src=" http://s3.51cto.com/wyfs02/M00/89/FB/wKiom1gi8HCyjFBsAAAk6hQajg0882.jpg "height=" "/>

Check "exposevirtualizationextensions" after execution, run the following command

Get-vmprocessor-vmname Nested | FL

650) this.width=650; "title=" clip_image009 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image009 "src=" http://s3.51cto.com/wyfs02/M01/89/FB/wKiom1gi8HLxVfE7AACni0mWmYk969.jpg "height=" 339 "/>

We turn on the computer nested and enable the Hyper-V feature:

650) this.width=650; "title=" clip_image011 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image011 "src=" http://s3.51cto.com/wyfs02/M01/89/F8/wKioL1gi8HWCNRR6AACe_c2Ugdg994.jpg "height=" 315 "/> Nested virtualization features Enable success:

650) this.width=650; "title=" clip_image013 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image013 "src=" http://s3.51cto.com/wyfs02/M01/89/F8/wKioL1gi8Hbgw0nYAACLSDND2AQ466.jpg "height=" 358 "/>

If you want to turn off nested virtualization features, you can use the following PS command:

Set-vmprocessor-vmname <VMName>-exposevirtualizationextensions $false

This article is from the "Wu Yuzhang Microsoft blog" blog, make sure to keep this source http://wuyvzhang.blog.51cto.com/9992636/1871192

Windows Server Hyper-V Nested Virtualization

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.