Configure External Hyper-V Switch For Internet Access


To enable Hyper-V virtual machines to access the internet on  Windows Server 2012 or higher, from within Hyper-V select Virtual Switch Manager. Add a new virtual network switch and select External. From the drop down select the network adapter you want to use to connect to the internet, and select Allow management operating system to share this network adapter.

This will create a bridged network on the host computer. Edit the TCP/IP v4 settings for the external virtual switch on the host computer as follows:

  • Open a command window and type: ipconfig, then press enter.
  • Using the given details from the results of the command:
    • Modify the IP address
    • Subnet Mask
    • Default Gateway
    • Primary DNS
    • Enable Internet Connection Sharing
  • Add the external virtual switch to your virtual machine whilst it is turned off.
  • Start your virtual machine.
  • Edit your external virtual switch, and give it the same property values as the host external virtual switch.

Example:

IP Address: 192.168.1.47

Subnet Mask: 255.255.255.0

Default Gateway: 192.168.1.1

Preferred DNS Server: 192.168.1.1 (Default IP Address of XyXEL Routers, will more than likely be different for different routers.)

Once you have performed the above, you should have a working internet connection.