In the previous article in this series, I showed you how to create a logical network, and how to link that logical network to a physical network adapter on a Hyper-V host. In this article, I want to conclude the series by showing you how to build a virtual network on top of one of the logical networks that you have already created. After doing so, you can link individual virtual machines to the new virtual network.

Before I jump into the configuration process, I want to quickly rehash what we did in the previous article. As mentioned above, the previous article was all about creating a logical network. A logical network is a network structure that spans multiple host servers. For example, we created a logical network that we called Infrastructure, and then we assigned the logical network an IP address space. Once we did that, we linked the logical network to the hosts in our host group by associating one of the physical NICs on each host with the logical network.

Our logical network creates a flat network structure that can be used for communications across Hyper-V hosts. However, simply building a logical network isn’t enough. Logical networks are a host level structure that is linked to physical NICs. Virtual machines do not use logical networks, they use virtual networks (which are sometimes called virtual machine networks). That being the case, we must create a virtual machine network that our virtual machines can use.

As was the case with the logical network, we will be using the System Center 2012 R2 Virtual Machine Manager console to create the virtual network. With that said, go ahead and open the console and then select the VMs and Services workspace. Make sure that the Home tab is selected, and then select the VM Networks container, as shown in Figure A.

Figure A: Select the VM Networks container.

Now, click on the Create VM Network icon located in the ribbon at the top of the screen. This will cause Windows to launch the Create VM Network Wizard.

The first thing that you must do is to enter a name for the virtual machine network that you are creating. It is a good idea to use a descriptive name, but you should also populate the Description field. As a network grows it is common to accumulate a number of virtual machine networks. As an administrator, it is critically important for you to be able to tell the difference between these networks. That’s why it is so important to use a meaningful name and description.

Since I am working in a lab environment, and am only creating a virtual machine network for demonstration purposes, I am going to call my virtual machine network Demo VM Network.

After providing a name and description for your virtual machine network, you will need to select a logical network on which you will overlay the virtual machine network. Remember that the logical network has to have been enabled for network virtualization. You can see what this looks like in Figure B.

Figure B: You must assign your virtual network a name and choose the logical network that will provide the underlying connectivity.

At first it may seem redundant to create a logical network and then create a virtual machine network. Keep in mind however, that a virtual machine network services virtual machines, while the logical network provides physical connectivity across physical hosts. Not only do virtual machine networks and logical networks have different purposes, but it is possible to create multiple virtual machine networks on top of a logical network. For instance in a cloud network, you might create a single tenant logical network, and then create a separate virtual machine network for each of your tenants.

Click Next and you will be taken to the Isolation screen. As the name implies, this screen allows you to choose whether or not to isolate the virtual machine network from the logical network. If multiple virtual machine networks will share a logical network then you will almost always want to choose the Isolate Using Hyper-V Network Virtualization option, as shown in Figure C. However, if only a single virtual machine network will exist on the logical network and you want the virtual machine network and the logical network to function as if they were one in the same then you can choose the No Isolation option.

Figure C: Under normal circumstances you will want to isolate the virtual machine network by using Hyper-V Network Virtualization.

Click Next, and you will be taken to the wizard’s VM Subnets screen. As the name implies, you must provide one or more subnets for your virtual machine network to use. Simply click the Add button and then enter a friendly name for the subnet and then the actual subnet, as shown in Figure D.

Figure D: You must provide at least one subnet.

There are a couple of things that you need to know about the Subnets screen. First, you can assign multiple subnets to a virtual machine network. Simply click the Add button once for each subnet.

Another thing that you need to know is that the subnet range doesn’t matter. Remember, the virtual machine network is isolated. As such, you can use the same subnet as your logical network if you want to. It is even OK to assign the same subnet to all of your virtual machine networks, so long as thexx`y are isolated from one another.

Click Next, and you will be taken to the Gateway screen. There is a good chance that you will see a warning message telling you that no network service exists that specifies a gateway has been added to VMM. If you see this message then simply click Next. Otherwise, you will need to configure if or how the gateway service will be used.

Click Next and you will see the summary screen. Take a moment to make sure that the configuration details that are displayed on this screen are correct, and then click Finish. When you do, the virtual machine network will be created, as shown in Figure E.

Putting Your VM Network to Work

Virtual machines can link directly to the virtual machine network that you just created. However, you can’t access the virtual machine network using the Hyper-V Manager. In order to connect a VM to the virtual machine network, you must use System Center Virtual Machine Manager to create (or edit) the virtual machine. As you can see in Figure F, the Virtual Machine Manager console allows you to select a virtual machine network and select a subnet on that network when creating a virtual machine.

Figure F: Virtual machines can be linked directly to a named subnet on your virtual machine network.

Conclusion

Software defined networking for Hyper-V takes a little bit of getting used to. Some of the concepts are quite a bit different from those used in the physical world. It is important to understand that most of the virtual networking capabilities are not exposed through the Hyper-V Manager, and can only be configured through System Center Virtual Machine Manager.

If you would like to read the other parts in this article series please go to:

Featured Links

Brien Posey

Brien Posey is a freelance technology author and speaker with over two decades of IT experience. Prior to going freelance, Brien was a CIO for a national chain of hospitals and healthcare facilities. He has also served as a network engineer for the United States Department of Defense at Fort Knox. In addition, Brien has worked as a network administrator for some of the largest insurance companies in America. To date, Brien has received Microsoft’s MVP award numerous times in categories including Windows Server, IIS, Exchange Server, and File Systems / Storage. You can visit Brien’s Website at: www.brienposey.com.

Follow Us

What You Need to Know About Software Defined Networking in Hyper-V (Part 6)

TECHGENIX

TechGenix reaches millions of IT Professionals every month, and has set the standard for providing free technical content through its growing family of websites, empowering them with the answers and tools that are needed to set up, configure, maintain and enhance their networks.