THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | Join | Help
in Search

John Paul Cook

Using Wireless with Hyper-V

For those of us who do demos on laptops, Hyper-V provides great performance but no wireless capability. You simply can't bind a Hyper-V virtual machine to a wireless adapter, but you can implement a workaround in just a few minutes. There are three options. One option is to use Internet Connection Sharing (ICS, see Ben Armstrong's blog http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/09/using-hyper-v-with-a-wireless-network-adapter.aspx). ICS imposes a restriction that seems too inconvenient to me. It requires an IP address of 192.168.0.1, which is also the default address for many NAT routers. Although it is possible to change the NAT router's address, there are always networks you're not allowed to reconfigure. A second option is to use Routing and Remote Access Service (RRAS, see Ken Schaefer's blog http://www.adopenstatic.com/cs/blogs/ken/archive/2008/01/17/15530.aspx). RRAS offers the flexibility of being able to change the IP address it uses to avoid conflicts. It requires the most steps but it can still be configured in under 10 minutes. The third option, which was suggested by a reader, is to bridge network connections. It's simple and quick to implement. My personal recommendation is to use RRAS.

Ken described the steps in written form. After explaining this in person to several people, I'm providing the screen captures so you can see exactly what you need to do for implementing either a network bridge or RRAS. The initial steps are the same for both.

You'll need to bind your virtual machines to an internal only virtual network adapter. Use the Virtual Network Manager in Hyper-V to accomplish this. Notice a meaningful name of Virtual Internal Network was specified, which is referenced in the next step. This step is necessary for both RRAS and bridging network connections.

ras2

To implement RRAS or a network bridge, go to Manage network connections to configure the network adapter. Notice that in this example, the Virtual Internal Network name from the previous step appears under Local Area Connection 3.

ras3

Select Internet Protocol Version 4 (TCP/IPv4) and click the Properties button. This is the same for both RRAS and a network bridge.

ras4 

To implement a network bridge, configure the virtual network adapter to use DHCP.
To implement RRAS, assign a static IP address on a different subnet than the one the wireless adapter is connecting to. The wireless adapter is connecting to a 192.168.0.x network, so 192.168.1.1 is specified to provide a different subnet for the virtual machines.

image             ras5
                           DHCP for Network Bridge                                                                                      Static IP for RRAS

To implement a network bridge, select both the virtual network adapter and the wireless adapter. Right-click and select Bridge Connections.

bridge

Your virtual machines bound to this bridged network adapter can use the wireless network adapter but they will not be able to access the host partition (physical computer) because of Windows Firewall. If you need your child partitions to have full connectivity to the parent partition, you'll need to change your Windows Firewall settings. On the Advanced tab, uncheck the network bridge to allow communication between the parent and child partitions. This is similar to what is shown in the last screen capture in this post.

To implement RRAS, add the RRAS role to your Hyper-V server. In the Server Manager, right-click Roles and select Add Roles.

ras1

A wizard will appear. Click Next to advance to the dialog box shown below. Check the box for Network Policy and Access Services and then click Next.

ras6 

You'll see a dialog box with no options. Click Next to advance to the following dialog box. Check the box for Routing and Remote Access Services. Be sure the two checkboxes underneath it are checked and click Next.

ras8

Click the Install button to install RRAS. When the installation finishes, click the Close button.

ras9

Once RRAS is installed, use the Server Manager to configure it. Right-click on Routing and Remote Access and select Configure and Enable Routing and Remote Access.

ras11

Select Network address translation (NAT) and click Next.

ras12

Select your wireless network adapter and click Next.

ras13

Select the network interface you assigned the static IP address to and click Next.

ras14

Select Enable basic name and address services and click Next.

ras15

Click Next and then click Finish on the screen that follow.

ras16

At this point, your virtual machine (called the child partition in Hyper-V parlance) has network connectivity, but not to the host physical machine (called the parent partition). If you want to enable child partition network access to the parent partition, you'll need to configure exceptions in Windows Firewall or disable it completely on the virtual network adapter used by your virtual machines.

ras18

Keep in mind that what was disabled here is the firewall on the internal network connection. The virtual machines are being routed to the network using the wireless adapter which is still protected by Windows Firewall.

Published Sunday, March 23, 2008 6:52 PM by John Paul Cook

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Ken Schaefer : Windows Hyper-V and Wireless adapters - using RRAS (Routing and Remote Access Service) said:

March 23, 2008 9:08 PM
 

Virtual PC Guy's WebLog said:

A while ago I talked about how to use ICS (Internet Connection Sharing) to enable wireless support with

March 24, 2008 8:30 PM
 

VANNESTE Xavier said:

Voila cela fait deux mois que j'utilise l'hyperV reguliérement dans mes développements. Je suis un peu

May 6, 2008 11:36 AM
 

NYMetro Core Infrastructure Specialist Team : Virtual Networking with Hyper-V said:

June 17, 2008 5:00 PM
 

Mirrored Blogs said:

Wireless networks are not supported with Hyper-V. John Paul Cook explains how to implement a workaround

July 23, 2008 1:38 PM
 

WIFI and Hyper-V said:

November 23, 2008 5:53 PM
 

Tim Mangan said:

Summary This article is a personal look at trying the Microsoft Hyper-V Server. It is not a formal "review"

November 30, 2008 1:34 PM
 

Adam Machanic said:

Just a note for anyone doing this who doesn't know much about networking in general.  I thought that my child partitions didn't have network access after following these steps, but the real problem was that they had no domain name service.  Solution: Enable the DNS Server Role on the parent partition.  This took me an embarrassingly long time to figure out, so I hope this comment saves some time for people trying to implement this solution!

December 12, 2008 2:57 PM
 

Mirrored Blogs said:

Wireless networks are not supported with Hyper-V. John Paul Cook explains how to implement a workaround

January 17, 2009 3:59 PM
 

Cloudpepper said:

Reversing Wireless with Hyper-v connectivity and using a physical network adapter

January 27, 2009 10:15 PM
 

Windows Server 2008 R2 Installation und Dualboot Konfiguration mit Windows 7 VHD-Boot « Joerg??s IT-Tech Blog said:

May 12, 2009 2:22 PM
 

Quick hit: Wireless network and Hyper-V « jim blizzard’s blog said:

June 2, 2009 9:57 AM
 

Jim Blizzards Blog said:

Ran across this helpful blog post by John Paul Cook as I was looking for a way to use my wireless network

October 3, 2009 8:26 AM
 

Blog | jim80.net » Setting up Hyper-V with NAT said:

January 20, 2010 12:59 AM
 

Running TMG (Threat Management Gateway) in Hyper-V - Persian Networks said:

February 2, 2010 4:42 AM
 

Technological said:

Windows Server 2008 R2でHyper-VとRRAS(Remote Access)を使う場合、NICがたくさん必要になります。 Internetアクセス用 Hyper-V専用NIC(ここからさらに仮想NICが作られます)

February 5, 2010 11:36 AM
 

Shan said:

This didn't quite work for me.  There isn't quite enough technical information in this article to assist in troubleshooting or to adapt to a particular topology.  For example, I could not see some of my adapters in the RRAS setup, and I don't know what the role of the bridge adapter is.  The article would be more useful with documented IP addresses and showing how to validate the configuration.

August 4, 2010 5:51 PM
 

Michael said:

Great post. I tried all three approaches but to no avail, until I realized that I had the Hyper-V role enabled on the guest OS. As soon as I removed it my bridged connection started working. (I was using the same based VHD for creating the host and guest, booting the host VHD in Windows 7 to run Hyper-V).

August 27, 2010 1:03 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit

About John Paul Cook

SQL Server MVP based in Houston, Texas.
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement