HyperV, Windows 8, and networking on a laptop (#Hyperv, #Win8)

As a consultant, my laptop is oftentimes our primary method to provide demonstrations for Microsoft technologies. With the release of Windows 8, the ability to run HyperV has been a great addition to the Operating System. I have had conversations with developers, and infrastructure personnel and there is a common question on how to best network our laptops when using HyperV. We need to have access to the Internet through our virtuals, and often we need a static IP address for features like running the virtual as a domain controller.

For my laptop, I create three different virtual switches. One for Internet access (static IP address), one for External wired connectivity, and one for External wireless connectivity as shown below.

image 

One network is connected to the wired link on the laptop as shown below.

image

Another network is connected to the wireless link on the laptop as shown below.

image

And a third is assigned to an internal only IP range so I can create a statically defined IP address for the system.

image

Next I assign all three networks as network adapters for the virtual as shown below. This example shows three network adapters – one for internal, one for external wireless and one for external wired.

image

In the client operating system we can now enable or disable the appropriate network adapter (or the adapters will just be connected or disconnected depending on whether the laptop is wired in or wirelessly connected). The example below shows how the network looks when I am on a wired connection to the network through my laptop.

image

Benefits:

  • This configuration provides an easy way to switch between whatever connection is available on the laptop for external access.
  • This configuration also provides an easy way to shut down all external connectivity from the guest OS to allow isolated testing.
  • Since a static IP address is available, all functions which require a static IP address work as expected.

Summary: By creating multiple virtual switches, and assigning each of them as a network adapter in the guest operating system it is easy to take a laptop which may move between a variety of different network connections and make it function regardless of what network is and is not functional on the laptop.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.