Why can't I get network acess in the Hyper-V virtual machine?

Gelsana Thompson 26 Reputation points
2022-05-17T04:29:54.103+00:00

Where are the network connections on Hyper-V and/or how do I set them up?

Using another virtual machine software and using a Ubuntu ISO file as a virtual machine, the network connections are available and I can load software using the command line to install a variety of software such as the Android Development Environmennt.

But when I try to do the same with Hyper-V, I am still able to install Ubuntu 22.04 but when I go to the command line to download software via my network connection:

sudo snap install android-studio --classic

I get this result:

202576-001.png

and if I just try to get an update with:

sudo apt-get update

I get this:
202623-002.png

I looked around Hyper-V and I foound this:

202602-003.png

And I tried to change it like so:
202603-004.png

But I was still unable to access the outside network.

Please advixe.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,176 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,549 questions
0 comments No comments
{count} votes

Accepted answer
  1. Luis Rodriguez 6,191 Reputation points Microsoft Employee
    2022-05-17T13:08:11.463+00:00

    Hello @Gelsana Thompson

    Welcome to Microsoft Q&A Platform.

    You should use an external switch, please check the thread below as it's related to the same behavior:
    https://learn.microsoft.com/en-us/answers/questions/133130/hypver-v-how-to-enableaccess-internet-access-on-th.html

    Best regards,

    ----------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Limitless Technology 39,376 Reputation points
    2022-05-23T08:56:53.287+00:00

    Hello

    Thank you for your question and reaching out. I can understand you are having issues while accessing network from Ubuntu VM.

    1. In your VM's Hyper-V settings, connect the network adapter to the Default Switch which gives access to host computer's network.
    2. In Ubuntu VM, go to Ethernet settings, then select IPv4 tab. Set IPv4 Method to Automatic (DHCP).
    3. Please try adding a "Legacy network adapter"
    4. Try creating and connecting to an External Virtual Switch

    https://learn.microsoft.com/en-us/answers/questions/172301/hyper-v-vm-network-connection-problem-with-default.html

    ---------------------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments