Hyper V vm has no internet access

Egan Santos 0 Reputation points
2024-02-27T12:23:28.6833333+00:00

I have a hyper-v server setup in Azure with the OS of windows server 2022 and have created a vm within that host. I already created an external switch on the server manager and attached that network adapter to my vm but I still have no internet connection and I can't even ping my host or its DNS server. Do note that the hyper v server and DNS server are all in the same resource group. I could ping the DNS server from my hyper v server and vice versa.

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,538 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 29,731 Reputation points Microsoft Vendor
    2024-02-29T06:17:22.83+00:00

    Hi Egan,

    Thanks for your post. Please refer the following configuration to get Hyper-V configured for your new nested environment. We will need to do the following in this tutorial to confirm the setup is working in your cloud nested environment. If you dont need to give your nested vms network access to your Azure VMs then you can skip setting up RRAS, Adding a 2nd NIC and setting up Azure defined routes.

    1. Add 2nd NIC to Hyper-V Host
    2. Create 2 subnets on Azure vNet
    3. Enable IP Forwarding on Hyper-V NIC
    4. Create a NAT’ed vSwitch for outside connectivity
    5. Setup RRAS (NAT)
    6. Create a guest virtual machine
    7. Configure the guest virtual machine
    8. Configure an IP address on the nested guest virtual machine
    9. Setup Azure Defined Routes
    10. Test connectivity

    Reference: How to Setup Hyper-V Nested Virtualization on Azure (cloudinfrastructureservices.co.uk) Best Regards, Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments