none
Hyper-V server 2019 – Guest VM cannot connect to Internet RRS feed

  • Question

  • I’m trying something apparently very simple, and I reviewed former posts for 2 days about the subject without success:

      - Setup a Hyper-V Server 2019
      - On that server, install a Gen-2 guest Virtual Machine (Windows server 2016 standard)

    I have been assured by written (by Dell) that the hardware I bought 3 months ago is fit for virtualization…

    Setting up a Hyper-Server, and joining it to a domain was pretty straight forward. Even installing the VM was pretty simple. The VM works!

    But I just can’t get the guest VM to connect to the network!

    Here is the current state, after I re-started from scratch (meaning reinstalled the computer from zero), and left the default, as generated by Microsoft:

    1) The Host does have access to internet (and is linked to AD) on ethernet NIC#1

      - Assigned Static IP: 192.168.0.96
      - Subnet: 255.255.255.0
      - gateway: 192.168.0.1
      - DNS: 192.168.0.1

    2) From a remote Hyper-V manager (because Hyper-V Server has no GUI), I did create a new Virtual Switch (and only one)

      - Name: vSwitchExternXyz
      - Type: external
      - Linked to the external network using the same NIC#1
      - Allowed management operating system to share this network adapter (this is by default)

    3) When executing an "ipconfig" in command line on the host, I see a new “Ethernet adapter vEthernet (vSwitchExternXyz)” this created, having:

      - Autoconfiguration IP4 Address: 169.254.197.61   (hey, this is a APIPA address! what DHCP is that?)
      - Subnet: 255.255.0.0
      - gateway: none

    4) From the remote Hyper-V manager, I did assign this vSwitchExternXyz Virtual Switch (the only one I created in the Host) to the guest VM

       - I left unchecked both options “Enable virtual LAN identification” and “Enable bandwidth management” (those are unchecked by default)

    5) When I start & connect to that only VM, and look at it network config, I get:

       - Autoconfiguration IP4 Address: 169.254.224.167 (again another APIPA address, given by DHCP)

       - Subnet: 255.255.0.0

       - gateway: none

    From that point, I’m not really surprised I cannot even ping any IP outside the APIPA address range.  I did try to assign it an IP and valid gateway (same as the host’s), but it makes no differences. (besides I have no clue how should a successful configuration looks like)

    Therefore I set myself IP, subnetmask, and gateway's IP, for both the vSwitch and VM vNetworkAdapter. I set them in the same subnet I the host into, the following way:

      vSwitch on Host
      - Assigned Static IP: 192.168.0.62
      - Subnet: 255.255.255.0
      - gateway: 192.168.0.1
      - DNS: 192.168.0.1

      vNetworkAdapteur on VM
      - Assigned Static IP: 192.168.0.61
      - Subnet: 255.255.255.0
      - gateway: 192.168.0.1
      - DNS: 192.168.0.1

    When running Windows' Network Diagnostics, I get the message "The default gateway is not available"

    I must be missing something.... what's wrong?

    Thursday, January 30, 2020 4:15 AM

Answers

  • I resorted to Microsoft support to resolve this issues (it took them 2.5 hours total to figure it out). 

    The problem was with the virtual switch with was corrupted for obscure reasons.

    It was not enough to just remove the vSwitch and re-create it.

    I had to:

    1. leave the faulty vSwitch there,
    2. create a new vSwitch
    3. Assign the new switch to the Guest VM's adapter
    4. only then, delete the faulty vSwitch

    Problem fixed, thanks to Raj at Microsoft technical support team.

    • Marked as answer by Magda7 Friday, January 31, 2020 6:03 PM
    Friday, January 31, 2020 6:02 PM