
Then from internet you should now be able to PortQuery or RDP to nested VM using port 50000


On the nested VM enable RDP it is not yet enabled. On the Azure VM, open PowerShell as an administrator and run command below to configure nat mappingĪdd-NetNatStaticMapping -NatName "InternalNat" -Protocol TCP -ExternalIPAddress 0.0.0.0 -InternalIPAddress 192.168.0.50 -InternalPort 3389 -ExternalPort 50000 Output The correct configuration for a nested environment to manage Azure VMs.įrom on the Azure VM you can setup nat mapping so you can access service on the nested VM from the internet, for example RDP. This will give you a VM in the Azure VM the is setup for DHCP and has internet connection. If all the commands above are successful you can now create a VM in the nested virtualization environment using the InternalNAT switch. Please make sure all commands ran without errors, See sample output here. Set-DhcpServerV4OptionValue -Router 192.168.0.1 -DnsServer 168.63.129.16Ĭommands above will create DHCP a scope for HyperV nat, assign gateway IP, DNS IP for that scope on the DHCP service and restart dhcp service. If all the commands above are successful run commands below in the same PowerShell window to configure the DHCP Service.Īdd-DhcpServerV4Scope -Name "DHCP-$switchName" -StartRange 192.168.0.50 -EndRange 192.168.0.100 -SubnetMask 255.255.255.0 Please make sure all commands ran without errors, see sample output here. New-NetIPAddress -IPAddress 192.168.0.1 -InterfaceIndex $ifIndex -PrefixLength 24Ĭommands above will create a HyperV internal switch, set nat rule and gateway for that switch. New-NetNat –Name $switchName –InternalIPInterfaceAddressPrefix “192.168.0.0/24” New-VMSwitch -Name $switchName -SwitchType Internal When Azure VM comes back up, RDP into it, open PowerShell as an administrator and run commands below to configure the HyperV network. Once roles are installed without error restart Azure VM. Install-WindowsFeature -Name DHCP,Hyper-V –IncludeManagementTools Output
#Install r studio on azure vm install
Prerequisiteĭeploy a Dv3 and Ev3 series Windows Server VM in Azure that supports nested virtualization, see article about the VM sizes here.Īfter Azure VM is deployed, RDP into the Azure VM, open PowerShell as administrator and run command below to install the HyperV and DHCP server roles. You need an Azure nested virtualization environment to fix an OS issue on a broken Azure VM or created a custom image in Azure. This article is meant to simplify the process and get you on your way to your actual issue.

Lots of documents and blogs out there about setting up nested virtualization using an Azure Virtual Machine(VM), most of them confusing others do not setup nested virtualization correctly for Azure VMs.
