Jump to content
  • entries
    142
  • comments
    0
  • views
    87624

Microsoft Azure Nested Virtualization | Hyper-V VM inside Azure VM


proximagr

849 views

 Share

Microsoft Azure Nested Virtualization | Hyper-V VM inside Azure VM
With the new Dv3 and Ev3 VM sizes Microsoft has released the Nested Virtualization, meaning you can simply have a Hyper-V VM inside an Azure VM. In this post I am testing the Nested Virtualization functionality creating a Hyper-V VM inside an Azure VM and have Network and Internet Connectivity.
Lets get started. First of all we will need a Dv3 or Ev3 VM and for best Nested Virtualization performance make use of SSD Managed Disks. I created a D4s_v3 Standard (4Cores, 16GB Ram, SSD managed disks) and I attached a 1023GB SSD Data Disk for performance.
img_5996b0e07f58f.png
Now remote desktop to the VM to add the Hyper V Role. From the Server Manager, add Roles and Features and add the Hyper-V role
img_5996b77ee73cf.png
Since this is an one NIC VM select the NIC to create the Virtual Switch
img_5996b8a3e7248.png
Change the default Store location to the SSD Data Disk, in this case the E: drive.

 

img_5996b93859436.png
Finally wait for the installation to complete and reboot the VM. After the VM reboots, Remote Desktop and open the Hyper-V manager. Now we have Hyper-V inside an Azure VM.
img_5996bd79e42cc.png
Lets create a VM. You can download a Trial Windows Server 2016 from https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2016or use your Subscription (MSDN, EA, etc).
I created a VM Called NestedVM01, with 4GB Ram using the Trial Windows Server 2016 ISO
img_5996bfe6c7469.png
After the VM creation setup the Windows Server 2016 with all defaults and login.
img_5996c72300c8a.png
The first thing to notice is that the Network Interface does not have a valid IP address, since Microsoft Azure will not provide one. In order to have the Nested VM to have Network connectivity we need to use NAT.
First change the Virtual Switch to “Internal network”
img_5996c7fe817c3.png
At the Host’s Network interfaces, open the vEthernet NIC and add a static IP, only IP & Mask
img_5996c8b5c6abe.png
Now we will need PowerShell, since we cannot configure NAT form the GUI.
Open the PowerShell (still at the Host Azure VM) and run

New-NetNat –Name NVMNat –InternalIPInterfaceAddressPrefix 192.168.168.0/24


The result:
img_5996c9d445e31.png
After that we can provide the Nested VMs with IPs form the 192.168.168.0/24 range. So login to the Nested VM and add an IP fron the Range and for Default Gateway add the Host’s IP.
For DNS add your AD DNS or a Public DNS server just to have internet.
img_5996cbfdd8e92.png
Now from the Nested VM you can ping the Host:
img_5996caec18263.png
And also browse the Internet:
img_5996ccc099e9e.png
Stay tuned, on my next post we will see how we can make the Nested VM a Web Server, a hidden Web Server in a VM inside an Azure VM!
Of course this Features opens the door for many more features to test, like Hyper-V Replica, Containers, etc, that we will see in future posts.

 

[/url]share_save_171_16.png
The post Microsoft Azure Nested Virtualization | Hyper-V VM inside Azure VM appeared first on Apostolidis IT Corner.



Source

 Share

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...