How to Create the External switch in the Hyper-V manager in Azure VM.

Srikanth Sattu 0 Reputation points
2024-07-24T08:34:30.6433333+00:00

Hello Team,

I've set up a VM in Azure using the D8as_V5 size, which supports nested virtualization. I've installed the Hyper-V role on it with Windows Server 2019 OS.

I can create internal switches and enable internet access for virtual machines in Hyper-V Manager. However, I'm encountering issues when attempting to RDP from other servers.

When trying to create an external switch, it shows the network is connected but lacks an internet option.

My objective is to enable internet access for virtual machines in Hyper-V Manager and establish RDP connections from other servers within the same Virtual Network in Azure.

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,735 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,604 questions
Windows Network
Windows Network
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Network: A group of devices that communicate either wirelessly or via a physical connection.
771 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Zunhui Han 2,395 Reputation points Microsoft Vendor
    2024-07-24T15:28:27.2166667+00:00

    Hello,

    Thank you for posting in Q&A forum.

    I suggest you try the following powershell command to create a virtual external switch which should resolve your issue:

    1. Click on the "Start Menu", enter PowerShell, right-click and select Run as administrator.
    2. Type the following command to create a new external virtual switch.

    New-VMSwitch -Name ExternalSwitch -NetAdapterName Ethernet -AllowManagementOS $True

    -name: What the network adapter looks like in Hyper-V Manager.

    -NetAdapterName: The name of the network adapter.

    -AllowManagementOS – $true for both the host and the virtual machine with internet.

    Image

    Reference links:Create a Virtual Network | Microsoft Learn

    I hope the information above is helpful.

    Best regards

    Zunhui

    ============================================

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

    0 comments No comments

  2. Srikanth Sattu 0 Reputation points
    2024-07-26T13:44:53.2866667+00:00

    Hello,

    I have made this setup in the Azure Virtual Machine with Nested Virtualization support VM.

    I have followed the same steps mentioned above. But still unable to get the internet access to the VM inside Hyper-V.

    I have made the document the steps I followed in my environment

    Virtual Switch.pdf

    Kindly Validate and let me know any changes required to achieve this.

    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.