You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/lab-services/concept-nested-virtualization-template-vm.md
+8-63Lines changed: 8 additions & 63 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,11 +30,11 @@ Before setting up a lab with nested virtualization, here are a few things to tak
30
30
31
31
- Choose a size that provides good performance for both the host (lab VM) and guest VMs (VMs inside the lab VM). Make sure the size you choose can run the host VM and any Hyper-V machines at the same time.
32
32
33
-
-The host VM requires extra configuration to let the guest machines have internet connectivity.
33
+
-If using Windows Server, the host VM requires extra configuration to let the guest machines have internet connectivity.
34
34
35
35
- Guest VMs don't have access to Azure resources, such as DNS servers, on the Azure virtual network.
36
36
37
-
- Hyper-V guest VMs are licensed as independent machines. For information about licensing for Microsoft operation systems and products, see [Microsoft Licensing](https://www.microsoft.com/licensing/default). Check licensing agreements for any other software you use, before installing it on the template VM or guest VMs.
37
+
- Hyper-V guest VMs are licensed as independent machines. For information about licensing for Microsoft operation systems and products, see [Microsoft Licensing](https://www.microsoft.com/licensing/default). Check licensing agreements for any other software you use, before installing it on a lab VM or guest VMs.
38
38
39
39
- Virtualization applications other than Hyper-V [*aren't* supported for nested virtualization](/virtualization/hyper-v-on-windows/user-guide/nested-virtualization#3rd-party-virtualization-apps). This includes any software that requires hardware virtualization extensions.
40
40
@@ -45,72 +45,17 @@ You can enable nested virtualization and create nested Hyper-V VMs on the templa
45
45
To enable nested virtualization for a lab:
46
46
47
47
1. Connect to the template VM by using a remote desktop client
48
+
1. Enable Hyper-V feature and tools on the template VM.
49
+
1. If using Windows Server, create a Network Address Translation (NAT) network to allow the VMs inside the template VM to communicate with each other.
48
50
49
-
1. Enable nested virtualization on the template VM operating system.
51
+
> [!NOTE]
52
+
> The NAT network created on the Lab Services VM will allow a Hyper-V VM to access the internet and other Hyper-V VMs on the same Lab Services VM. The Hyper-V VM won't be able to access Azure resources, such as DNS servers, on an Azure virtual network.
50
53
51
-
- Enable the Hyper-V role: the Hyper-V role must be enabled for the creation and running of VMs inside the template VM.
52
-
- Enable DHCP (optional): when the template VM has the DHCP role enabled, the VMs inside the template VM get an IP address automatically assigned to them.
53
-
- Create a NAT network for the nested VMs: set up a Network Address Translation (NAT) network to allow the VMs inside the template VM to have internet access and communicate with each other.
54
-
55
-
>[!NOTE]
56
-
>The NAT network created on the Lab Services VM will allow a Hyper-V VM to access the internet and other Hyper-V VMs on the same Lab Services VM. The Hyper-V VM won't be able to access Azure resources, such as DNS servers, on an Azure virtual network.
57
-
58
-
1. Use Hyper-V manager to create the nested virtual machines inside the template VM.
59
-
60
-
> [!NOTE]
61
-
> Make sure to select the option to create a template virtual machine when you create a lab that requires nested virtualization.
54
+
1. Use Hyper-V manager to create the nested virtual machines inside the template VM.
55
+
1. Verify nested virtual machines have internet access.
62
56
63
57
Follow these steps to [enable nested virtualization on a template VM](./how-to-enable-nested-virtualization-template-vm-using-script.md).
64
58
65
-
## Connect to a nested VM in another lab VM
66
-
67
-
You can connect to a lab VM from another lab VM or a nested VM without any extra configuration. However, to connect to a nested VM that is hosted in another lab VM, requires adding a static mapping to the NAT instance with the [**Add-NetNatStaticMapping**](/powershell/module/netnat/add-netnatstaticmapping) PowerShell cmdlet.
68
-
69
-
> [!NOTE]
70
-
> The ping command to test connectivity from or to a nested VM doesn't work.
71
-
72
-
> [!NOTE]
73
-
> The static mapping only works when you use private IP addresses. The VM that the lab user is connecting from must be a lab VM, or the VM has to be on the same network if using advanced networking.
74
-
75
-
### Example scenarios
76
-
77
-
Consider the following sample lab setup:
78
-
79
-
- Lab VM 1 (Windows Server 2022, IP 10.0.0.8)
80
-
- Nested VM 1-1 (Ubuntu 20.04, IP 192.168.0.102)
81
-
- Nested VM 1-2 (Windows 11, IP 192.168.0.103, remote desktop enabled and allowed)
82
-
83
-
- Lab VM 2 (Windows Server 2022, IP 10.0.0.9)
84
-
- Nested VM 2-1 (Ubuntu 20.04, IP 192.168.0.102)
85
-
- Nested VM 2-2 (Windows 11, IP 192.168.0.103, remote desktop enabled and allowed)
86
-
87
-
To connect with SSH from lab VM 2 to nested lab VM 1-1:
0 commit comments