Azure Nested VM pinging issue

HASSAN BIN NASIR DAR 391 Reputation points
2023-02-20T01:54:23.9333333+00:00

Hi

I have created VM on Azure with Windows Server 2019. Hyper-V is installed on this VM. I have created Internal NAT switch and 1 VM on the Hyper-V.

IP Setting on Hyper-V is below.

10.0.0.4 (assigned by Azure Vnet)

192.168.0.1 (Internal NAT Switch IP)

DHCP is install on the hyper-v (Assigning IP to inside the hyper-v VM)

VM inside the virtual machine and hypervisor itself both are pinging to each other

What is issue?

I have created one more subnet on the Azure VNET and then created one more azure VM. New subnet is attached with this new VM.

This new VM is not pinging to Hyper-V switch (192.168.0.1) and inside hyper-v VM. It is only pinging to 10.0.0.4 (Hyper v IP which is assigned by Azure Vnet) But Hyper-V server and inside the vm both are pinging to this new Azure VM.

Firewall is off on all VMs

Please any tip?

Regards

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,762 questions
{count} votes

2 answers

Sort by: Most helpful
  1. msrini-MSFT 9,291 Reputation points Microsoft Employee
    2023-02-22T04:27:06.1366667+00:00

    Hi, Your new VM in Azure is not aware of the 192.x.x.x ip space. You will need to create a Route table and forward the traffic to 10.x.x.x ip and once the packet reaches the destination Azure VM, you will need to perform DNAT based on the port and forward it to right VM.

    0 comments No comments

  2. KapilAnanth-MSFT 49,536 Reputation points Microsoft Employee Moderator
    2023-02-22T04:43:46.06+00:00

    Hi,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you would like to use Nested Virtualization in Azure.

    You are not able to ping the IP of the HyperV Switch nor the NestedVM's IP.

    This is an expected behavior.

    While Azure Supports Nested Virtualization for certain VM sizes, the underlying Azure Platform will not be aware of the IPs used by the HyperV switch and the NestedVM.

    In other words, the NestedVM will NOT be part of the Azure Vnet

    For a traffic destined to a NestedVM

    • You have to use the IP of the VM (Azure Provided) to route traffic to the AzureVM
    • And within Azure VM, you have to NAT it to the IP of the NestedVM
    • Refer : Networking for Nested Virtualization

    Please let us know if you require further information on this.

    Cheers,

    Kapi

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.