Skip to content

Commit 07588b2

Browse files
author
Jill Grant
authored
Merge pull request #267304 from EMaher/origin/enewman/nested-virt-no-dhcp-2
removing dhcp from nested virtualization docs
2 parents 62638b8 + d9b32ba commit 07588b2

File tree

2 files changed

+84
-223
lines changed

2 files changed

+84
-223
lines changed

articles/lab-services/concept-nested-virtualization-template-vm.md

Lines changed: 8 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ Before setting up a lab with nested virtualization, here are a few things to tak
3030

3131
- 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.
3232

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.
3434

3535
- Guest VMs don't have access to Azure resources, such as DNS servers, on the Azure virtual network.
3636

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.
3838

3939
- 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.
4040

@@ -45,72 +45,17 @@ You can enable nested virtualization and create nested Hyper-V VMs on the templa
4545
To enable nested virtualization for a lab:
4646

4747
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.
4850

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.
5053
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.
6256

6357
Follow these steps to [enable nested virtualization on a template VM](./how-to-enable-nested-virtualization-template-vm-using-script.md).
6458

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:
88-
89-
1. On lab VM 1, add a static mapping:
90-
91-
```powershell
92-
Add-NetNatStaticMapping -NatName "LabServicesNat" -Protocol TCP -ExternalIPAddress 0.0.0.0 -InternalIPAddress 192.168.0.102 -InternalPort 22 -ExternalPort 23
93-
```
94-
95-
1. On lab VM 2, connect using SSH:
96-
97-
```bash
98-
99-
```
100-
101-
To connect with RDP from lab VM 2, or its nested VMs, to nested lab VM 1-2:
102-
103-
1. On lab VM 1, add a static mapping:
104-
105-
```powershell
106-
Add-NetNatStaticMapping -NatName "LabServicesNat" -Protocol TCP -ExternalIPAddress 0.0.0.0 -InternalIPAddress 192.168.0.103 -InternalPort 3389 -ExternalPort 3390
107-
```
108-
109-
1. On lab VM 2, or its nested VMs, connect using RDP to `10.0.0.8:3390`
110-
111-
> [!IMPORTANT]
112-
> Include `~\` in front of the user name. For example, `~\Administrator` or `~\user1`.
113-
11459
## Recommendations
11560

11661
### Non-admin user

0 commit comments

Comments
 (0)