Public and Private Hyper-V Networks in Windows 8

By | 2012-08-10T15:52:47+00:00 August 10th, 2012|Uncategorized|6 Comments


Once Windows 8 RC was released, and Hyper-V for the client OS was working, I was immediately excited. I could now have virtual machines run locally without having to install a server operating system onto my machine. I got my machine up and running with the Windows bits, and I then tasked myself into getting the virtual machines going. Everything was really quick and easy to get going; however, when it came to having a private network for my virtual machines to talk on and also have access to the external world, it was pretty frustrating. The main reason I want this is to have static routes so that I can RDP into my virtual machines instead of using the Connect… window that Hyper-V gives us. I have to give almost all the credit of this blog post to Martin Hinshelwood for showing me, very briefly, how he managed to set it up. I’m not sure if I replicated his configuration exactly, but this is definitely working for me without a problem.

Hyper-V Network Switches

The first thing that you will need to do is set up your network switches within Hyper-V to allow this setup. So, if we open up Hyper-V Manager and go to the Virtual Switch Manager, you will see the following dialog:

Figure 1: Creating a virtual switch

You get the option of creating either an External, Internal, or Private switch within Hyper-V. We’ll be creating two separate switches to be able to do this, External and Internal. The names are pretty self-explanatory, but there is also the Private option. What is this for? This is almost identical to Internal, except that Internal networks gives the virtual machines access to the host machine, and vice-versa, whereas the Private switch does not allow this. So, first thing is first, let’s go ahead and create an External Virtual Switch.

Now, the next part is important to pay attention to, especially if you’re on a laptop. If you have wireless and wired NICs on your computer, you will have to be specific as to which one you choose. I’m mainly on my wireless card on my laptop, so I have mapped that specific NIC to this switch. I’ve left all the default settings and named the switch Public.

Figure 2: Creating an External virtual switch

Once this has been created, go ahead and select the New virtual network switch one more time and create an internal network switch. Again, I left the default settings and named it Private.

Figure 3: Creating an Internal network

Okay, so now we have our virtual switches up and running (yay!). Let’s move on to set up of the connections on our local machines. This is absolutely needed so that the virtual machines will have a gateway to talk to.

Local Machine Network Configuration

So, on our local machine we will now have two active networks on our local machine in the Network and Sharing Center. They will both be vEthernet connections because Windows 8 has some crazy stuff in the background. No worries, though, we only need to change a little configuration on our private network virtual switch.

Figure 4: Setting up the local host’s network configuration

Above is the workflow of menus you need to go through to get to where you set up a static IP for your local machine on the internal virtual switch. Here are the steps:

  1. Click on vEthernet (Private) hyperlink to open status window.
  2. Click on Properties
  3. Find and select Internet Protocol Version 4 (TCP/IPv4) and then click Properties again.
  4. You will find yourself at the IPv4 Properties pane. Follow configure it with these settings:
    1. Choose Use the following IP address radio button
    2. IP address: I used but you can use whichever IP address you like. (I really like the number 5 J)
    3. Subnet mask:
  5. Click Ok and Close twice.

This will get you back to your Network and Sharing Center. We are now finished with setting up our local machine’s configuration. Time to move onto the virtual machines.

Virtual Machine Configuration

Now, to get our virtual machines connected to both of these networks, we have to connect them up to the switches in the Hyper-V Manager.

Figure 5: Connecting the virtual machine up to the virtual switches (external and internal)

Above, I have selected my machine (the one labeled [] – ALM 2010 RTM) and then clicked Settings…. This will bring up the settings pane for the selected virtual machine. From here, you need to make sure that you have added two Network Adapters and connect one to the Private switch and the other to the Public switch. If the virtual machine only has one Network Adapter select the Add Hardware at the top of the list on the left and add a new one. Once the machine has been hooked up to the switches, click Ok and start up the virtual machine.

Connect to the virtual machine by selecting it and clicking Connect… in the bottom right pane of the Hyper-V Manager. Once connected, log into an administrator role on the machine and open up the Network and Sharing Center within the virtual machine. In the virtual machine, you will notice that it looks almost identical to your local machine, except the two connections are not vEthernet‘s.

Figure 6: Configuring the virtual machine’s network configuration

This is almost identical to what we did to the local machine except we want to give this virtual machine its own static IP address (I gave mine and then put our local machine as the default gateway. Once done, click Ok and then Close twice to return to the Network and Sharing Center. Everything should be set up correctly, and you should be able to run ipconfig in a command prompt and see the correct results.

Figure 7: Confirming the network settings

Now that this has been verified, we should be able to remote into the machine from the local host (as long as it has the appropriate RDP settings), and the virtual machines will be able to talk to one another on the private network.

About the Author:


  1. Martin Hinshelwood August 11, 2012 at 7:30 am

    How do you get Hyper-V Guests online and RDP to them? @JamesTUPPER tells you how in simple easy to follow steps.

  2. Robert Manahan December 1, 2012 at 2:42 pm

    this was awesome!! i like the design…nat on nat action…LOL

  3. Thibault December 22, 2012 at 4:15 pm

    Great article.
    It really helps me.
    Thanks you !

  4. Webjc January 23, 2013 at 8:02 am

    I have Issues with this Internal network, the DC in my virtual environment causes issues on the company DC’s 🙁 I had to set it to a private network, but now my RDP is not possible anymore, is there a workaround for this?

  5. […] tried a few different solutions, such as this one from Rick Gipson, and this one. However, for some reason bridging didn’t seem to be working the way I wanted/expected (i.e. […]

  6. Simon Dingley August 20, 2015 at 4:45 am

    Thanks for posting this – it was a great help and was nice and easy to follow.

Leave A Comment