THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
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 ICS imposes a restriction that seems too inconvenient to me. It requires an IP address of, 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 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.


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.


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


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 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.


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.


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.


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.


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


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.


Select Network address translation (NAT) and click Next.


Select your wireless network adapter and click Next.


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


Select Enable basic name and address services and click Next.


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


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.


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



cinahcaM madA 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

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

cg said:

Excellent article.

One more question though. I can remote admin from a different machine to the host Hyper V machine (Parent partition) for admin purposes. Once In the host admin machine, I can remote into the guest machine (Child Partition) as well. But I can't seem to remote into the guest machine directly from a different machine on the network. Is there anyway to do this?

Also, the domain for the guest machine (named server1) seems to be even though the workgroup I set is "WORKGROUP". Is there anyway to change this? Perhaps to

February 6, 2011 9:29 AM

Mictian said:

Hi John Paul Cook, that's a good post.

I have some issues. I have completed all this steps, one by one. But my virtual OS doesn't connect :S!

I have in both cases Windows Server 2008 R2 recently installed.

Something curious is that RRAS report some problems:

Error: "Unable to add the interface {...} with the Router Manager for the IPV6 protocol. The following error occurred: Cannot complete this function".

Someone have any idea. ¿?


February 25, 2011 2:43 PM

Roland Strauss said:

Tried it with SBS2008 as guest OS and it worked like a charm.

May 5, 2011 1:54 PM

Joe Meree said:

Great article.  Warning: I tried the bridged network connection approach and I didn't like it.  Next I tried to install RRAS.  It stopped me and said I had Internet Connection Sharing (ICS) implemented, which I didn't.  I deleted the network bridge adapter and it took out all my network connections AND my w2k8 r2 server manager AND it broke all my virtual machines.  Fortunately I had the VHD's on another disk and none of them were running.

August 18, 2011 4:16 PM

Joe Meree said:

Some notes on how I got this working:

RRAS-specific notes:

I did my wired connection first and then added my wireless connection to RRAS afterwards.

I had a domain controller (DC) with a DNS server on it.  The first time I ran the rras setup, I had the DNS server from that virtual DC specified on my host internal adapter ipv4 settings and it didn't work.  I removed rras, removed the dns server from the host internal adapter ipv4 settings and ran rras setup again.

After running rras, I had to add the host internal adapter static IP address to each VM internal adapter default gateway (DG) field to get this to work.  

It took some playing around and a few clicks on the "diagnose this adapter" button to get this to work.  

I found this article very helpful:

I found it helpful to always rename a virtual adapter after creating it to keep them all straight.


All of the hoops I jumped through for a year to get this working:

I've struggled for a year with virtual network adapters.  I've found that adding and removing virtual network adapters can really mess up your networking.  It turns out if you add and remove network adapters, they accumulate as "hidden".  I found an article that helped a lot.

For each VM: 1. Shutdown VM  2. Remove all the virtual network adapters from hyperv console settings  3. Start the vm and then use these commands from THE SAME elevated command prompt to delete all of the network adapters:

set devmgr_show_nonpresent_devices=1

start devmgmt.msc


network bridge

I tried using the network bridge approach with multiple virtual network adapters.  That worked, but later on, when preparing to try rras, I deleted the network bridge adapter from the host.  Bad move.  It took out all of the network adapters, my windows server 2008 r2 (w2k8 w2k8r2) Server Manager AND all of my VM's.  Had to restore everything from backup.


ics connection sharing

Next I tried internet connection sharing (ICS) and that didn't work very well. When I tried to install rras, it kept complaining about ics sharing being active when it really wasn't (restore from backup)



I have my VMs on a second internal hard drive in my laptop.  My company requires bitlocker on all my partitions :(  I found that turning off bitlocker for the duration of this exercise makes it a lot easier to restore my w2k8 partition from my windows home server (WHS) backups.  I wish you could do snapshots on the host ;)

Once again, thanks John for helping (it's too late for my hair, I've already pulled it all out...)

Joe Meree, Microsoft Consultant

August 19, 2011 10:58 AM

Joe Meree said:

August 19, 2011 10:59 AM

Joe Meree said:

I've been working on this more.  I've been having issues with the stability of my virtual network.  Sometimes I get connected to the internet and sometimes I don't.  I went back and setup RRAS again with only my wireless adapter and it works.  When I go to server manager under RRAS/NAT and add in the wired adapter my virtual machine guests lose connectivity to the internet.  I have added the DNS role to my host and on my guest virtual internal adapters under ipv4, I have as my gateway and as my DNS server.  Also on the wireless adapter under NAT/properties, I have "enable NAT on this interface" checked.  Any ideas on how to get both the wired and wireless networks working at the same time?

September 9, 2011 12:37 PM

Joe Meree said:

So in the Network and Sharing Center, the Network types can pile up and mess up the virtual machine guest networking just like the virtual network adapters can (see above).  So, I clicked on the picnic bench icon (for public network type) and clicked on the "merge or delete network locations" link at the bottom of the dialog box.  In my case, on each guest, I removed all the networks except the domain network for my little domain.

For the DNS server I added, it turns out I can specify either the dns server on the domain controller or the dns server on my host.  I don't know if that was really necessary for my setup to work.  I'm certainly not going to screw around with it because everything is working now...

September 9, 2011 5:18 PM

Filoupe said:

Because my Win2008 R2 laptop is a direct access client I cannot completely remove the firewall on the virtual network adapter (For your security, some settings are controlled by Group policy).

I cannot remove a NIC from the profile using NETSH.(from Microsoft: you cannot use netsh to configure per profile enabling or disabling of specific connection types).

What are the exceptions I should have to enable child partition network access to the parent partition?


November 23, 2011 6:32 AM

Jockie said:

thanks, so helpful :)

December 22, 2011 3:27 AM

Emmanuel said:

how would the set up look like if a relay agent was used with the RRAS? is it also possible?

January 9, 2012 8:05 AM

Emmanuel said:

just so that ki do not have to keep setting up RRAS if i change networks, as i use a usb wireless internet dongle.

and my adapter disappears everytime i unplug. i quiet remember seeing a similar setup like the one abve completed with a relay agent.

can someone please help me with that. i am just a student trying to set up my study Lab with my laptop.


January 9, 2012 8:09 AM

Fantastic Article - worked for me said:

This article is excellent!! I followed the steps to implement RRAS on my Hyper-V host and it works like a dream. The only additional step I had to make was to add the public DNS server (as configured by DHCP on the wireless card) as a secondary DNS server on my guests.

Thanks very much for taking the time to share this knowledge with us!

January 16, 2012 10:29 AM

Andrew Carter said:

Excellent work just the article I required ..

April 27, 2012 11:50 AM

Seyed said:

Answer to CG question to provide access to guests from different machines on the host:

CG: you should use external networks to do so.

February 13, 2013 11:44 AM

Seyed said:

Great Post John.

February 13, 2013 11:45 AM

Dips said:

Hi gurus

Just a quick question. I have tried everything mentioned in this post  without any success. I am running the following config:

Windows 2012 server, standalone on a workgroup, connected to the internet using a wire. The system has got 3 VMs running on Hyper-v. The 3 VMs are in their own network, part of their own domain, one DC, one server and one client. I want all 3 VMs to be able to access the internet through the host connection. On the virtual switch manager I have created an internal only switch and connected all the 3 Vms to it. On the host I have configured RRAS and NAT. From the host I can ping the 3 VMs. But from the VMs I can't communicate to outside. Both the wired network adapter and the vswitch has been configured to use dynamic IP. I can set the vswitch adapter with static IP, but then do I need to configure the vswitch as the gateway for the VMs? At this point the VMs are using the DC as the default gateway. I am trying to get a configmgr 2012 lab going and that is why having outside internet access should be ideal.Am I making some glaring errors?

Any help will be greatly appreciated.

Thanks and kind regards,

March 4, 2013 1:00 AM

mjmart61 said:

Thank you so much for making this so clear and easy to follow.  I could not find the help I needed anywhere else.  Everything is working great!  Thanks again.

April 8, 2013 1:19 PM

Bhism said:


April 9, 2014 4:21 PM

Henri Hein said:

That was excellent, John, helped me out.

November 12, 2014 3:59 PM

Leave a Comment


About John Paul Cook

John Paul Cook is a database and Azure specialist in Houston. He previously worked as a Data Platform Solution Architect in Microsoft's Houston office. Prior to joining Microsoft, he was a SQL Server MVP. He is experienced in SQL Server and Oracle database application design, development, and implementation. He has spoken at many conferences including Microsoft TechEd and the SQL PASS Summit. He has worked in oil and gas, financial, manufacturing, and healthcare industries. John is also a Registered Nurse currently studying to be a psychiatric nurse practitioner. Contributing author to SQL Server MVP Deep Dives and SQL Server MVP Deep Dives Volume 2. Connect on LinkedIn

This Blog



Privacy Statement