2017年10月21日星期六

Nested virtualization for Hyper-v

Nested virtualization is a feature that allows you to run Hyper-V inside of a Hyper-V virtual machine.

Prerequisites
A Hyper-V host running Windows Server 2016 or Windows 10 Anniversary Update.
A Hyper-V VM running Windows Server 2016 or Windows 10 Anniversary Update.
A Hyper-V VM with configuration version 8.0 or greater.
An Intel processor with VT-x and EPT technology.


Configure Nested Virtualization
While the virtual machine is in the OFF state, run the following command on the physical Hyper-V host.
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true





After, you must make the following configuration changes on the VM that function as a Hyper-V host.
On the Memory page, disable Dynamic Memory. Or using PowerShell cmdlet.
set-vmmemory -vmname server1 -dynamicmemoryenabled $false








On the Processor page, or using PowerShell cmdlet set Number Of Virtual Processors to 2 or more.
set-vmprocessor -vmname server1 -count 8





On the Network Adapter/Advanced Features page, turn on MAC Address Spoofing.
Set-VMNetworkAdapter -VMName Server_1 -Name "NetworkAdapterName" -MacAddressSpoofing On











If you do not know Network Adapter Name, you can using Get-VMNetworkAdapter command to view.

Now, you can start the VM, install the Hyper-V role, and create nested virtual machines. While the VMs run on the nested host, there are some Hyper-V features that do not work, such as live memory resizing, checkpoints, Live Migration, and Save/Restore.

没有评论:

发表评论