Skip to content

Commit b1feceb

Browse files
committed
adding powershell example
1 parent 3431863 commit b1feceb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

articles/lab-services/how-to-enable-nested-virtualization-template-vm-using-script.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ If you're using the Medium (Nested Virtualization) VM size for the lab, consider
166166
167167
Running a lab VM as a DHCP server is an *unsupported* scenario. See [Can I deploy a DHCP server in a virtual network?](/azure/virtual-network/virtual-networks-faq) for details. Changing the settings of the lab VM can cause issues with other lab VMs.
168168
169-
If you have the DHCP role installed, try enabling Hyper-V [DHCP guard](/archive/blogs/virtual_pc_guy/hyper-v-networkingdhcp-guard) to block outbound offer packets.
169+
If you have the DHCP role installed, try enabling Hyper-V [DHCP guard](/archive/blogs/virtual_pc_guy/hyper-v-networkingdhcp-guard) and [Router guard](/archive/blogs/virtual_pc_guy/hyper-v-networkingrouter-guard).
170+
171+
```powershell
172+
Get-VMNetworkAdapter * | Set-VMNetworkAdapter -RouterGuard On -DhcpGuard On
173+
```
174+
170175
171176
- Check the network adapter settings for the Hyper-V VM.
172177

0 commit comments

Comments
 (0)