Create a Nested Virtualization Supported Hyper V on Azure
- Once the Windows Machine once the VM is up and HyperV is installed, we need to setup a NAT-network
- Launch Powershell as Admin and Executed the following command
New-VMSwitch -Name "InternalNAT" -SwitchType Internal
- View the Properties of the Switch and note the ifindex
Get-NetAdapter
- Create an IP Address for NAT Gateway using belwo command
New-NetIpAddress -IPAddress 192.168.0.1 -PrefixLength 24 -InterfaceIndex 12
- Create a NAT Network
New-NetNAT -Name "InternalNat" -InternalIPInterfaceAddressPrefix 192.168.0.0/24
- Now to dynamically assign IP Addresses to the VMs which we are going to create inside the Hyper-V, we would be create a DHCP Server and Scope
- To Install DHCP Server, Add Roles and Feature => DHCP, Default installation steps (Continue Wizard next till the end of the wizard)
- Now Create DHCP Scope for IPV4
- Continue the rest of the stps till the close (end)
Other Lab Setup
- Lets install chocolatey on the Windows, Run Powershell as admin and install chocolatey by copying
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
or Refer Here - Lets install Google Chrome using chocolatey
choco install googlechrome -y
- Lets install vagrant to create virtual machines
choco install vagrant
- Now Restart the machine to create virtual machines
- To be continued in next session