Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Microsoft Hyper-v nested Virtualization

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Now nested virtualization is becoming more and more popular, and many brothers have begun to study Microsoft's Hyper-v nested virtualization, so what is nested virtualization?

What is nested virtualization simply allows you to use a virtual machine as a Hyper-V host and create a virtual machine in the virtualized host, which is especially useful for development and test environments. Build 10565 physical HYPER-V hosts and virtualized hosts running at least Windows Server 2016 Technical Preview 4 or Windows 10.

In the following figure, you can see a host running a virtual machine, thus running its own virtual machine, which is achieved through nested virtualization.

Different Virtualization below is a normal virtualization scenario (no virtualization nesting). The Hyper-V hypervisor has full control over the extension of virtualization (orange arrow section), but these virtualization extensions cannot be called by the guest OS.

In contrast, the following nested diagram. Hyper-V has been configured so that the virtualization extension can be called by the guest virtual machine. Guest virtual machines can take advantage of this and install their own management programs. It can run its own guest virtual machine.

How to enable nested Virtualization

PS: all the commands involved below are run on the physical server

First, let's install a virtual machine and install Hyper-v in the virtual machine, and you will get the following error

As said in the screenshot, virtualization is not enabled on our virtual machines. We can check the list of virtual machines first.

Get-VM

Find the name of the machine on which we want to turn on the virtualization feature and view the properties of the virtual machine. From the red position in the screenshot, we can see that the virtual machine does not enable nested virtualization.

Get-VMProcessor-VMName virtual machine name | fl

As shown in the figure, when you use the command to enable the nested virtualization feature, the following error will be reported, as shown in the figure:

Set-VMProcessor-ExposeVirtualizationExtensions $true-VMName virtual machine name

The above error occurs because the virtual machine is running and modification is not allowed. We need to shut down the virtual machine first and then modify it again.

After shutting down, we run the Set command again, as shown in the figure:

Set-VMProcessor-ExposeVirtualizationExtensions $true-VMName virtual machine name

After the modification, we Get the status of the virtual machine again. As shown in the figure, we see that the nested virtualization feature has been enabled.

Get-VMProcessor-VMName virtual machine name | fl

At this time, we start the virtual machine and install the Hyper-v function again, as shown in the figure:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 279

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report