John Paul Cook : Hyper-Vhttp://sqlblog.com/blogs/john_paul_cook/archive/tags/Hyper-V/default.aspxTags: Hyper-VenCommunityServer 2.1 SP2 (Build: 61129.1)Using Wireless with Hyper-Vhttp://sqlblog.com/blogs/john_paul_cook/archive/2008/03/23/using-wireless-with-hyper-v.aspxSun, 23 Mar 2008 22:52:00 GMT21093a07-8b3d-42db-8cbf-3350fcbf5496:5753John Paul Cook23http://sqlblog.com/blogs/john_paul_cook/comments/5753.aspxhttp://sqlblog.com/blogs/john_paul_cook/commentrss.aspx?PostID=5753<P>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 <A title=http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/09/using-hyper-v-with-a-wireless-network-adapter.aspx href="http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/09/using-hyper-v-with-a-wireless-network-adapter.aspx">http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/09/using-hyper-v-with-a-wireless-network-adapter.aspx</A>). 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 <A title=http://www.adopenstatic.com/cs/blogs/ken/archive/2008/01/17/15530.aspx href="http://www.adopenstatic.com/cs/blogs/ken/archive/2008/01/17/15530.aspx">http://www.adopenstatic.com/cs/blogs/ken/archive/2008/01/17/15530.aspx</A>). 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.</P>
<P>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.</P>
<P>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 <STRONG>Virtual Internal Network</STRONG> was specified, which is referenced in the next step. This step is necessary for both RRAS and bridging network connections.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras2_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras2 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras2_thumb.jpg" width=673 height=582></A> </P>
<P>To implement RRAS or a network bridge, go to <STRONG>Manage network connections</STRONG> to configure the network adapter. Notice that in this example, the <STRONG>Virtual Internal Network</STRONG> name from the previous step appears under <STRONG>Local Area Connection 3</STRONG>.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras3_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras3 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras3_thumb.jpg" width=637 height=424></A> </P>
<P>Select <STRONG>Internet Protocol Version 4 (TCP/IPv4)</STRONG> and click the <STRONG>Properties</STRONG> button. This is the same for both RRAS and a network bridge.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras4_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras4 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras4_thumb.jpg" width=396 height=497></A>&nbsp; </P>
<P>To implement a network bridge, configure the virtual network adapter to use DHCP. <BR>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 <STRONG>192.168.1.1</STRONG> is specified to provide a different subnet for the virtual machines.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/image_4.png"><IMG style="BORDER-BOTTOM:0px;BORDER-LEFT:0px;BORDER-TOP:0px;BORDER-RIGHT:0px;" border=0 alt=image src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/image_thumb_1.png" width=397 height=441></A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras5_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras5 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras5_thumb.jpg" width=397 height=440></A> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <EM>DHCP for Network Bridge&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Static IP for RRAS</EM></P>
<P>To implement a network bridge, select both the virtual network adapter and the wireless adapter. Right-click and select <STRONG>Bridge Connections</STRONG>.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/bridge_2.jpg"><IMG style="BORDER-BOTTOM:0px;BORDER-LEFT:0px;BORDER-TOP:0px;BORDER-RIGHT:0px;" border=0 alt=bridge src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/bridge_thumb.jpg" width=719 height=357></A> </P>
<P>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 <STRONG>Advanced</STRONG> 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.</P>
<P>To implement RRAS, add the RRAS role to your Hyper-V server. In the Server Manager, right-click <STRONG>Roles</STRONG> and select <STRONG>Add Roles</STRONG>.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras1_6.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras1 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras1_thumb_2.jpg" width=223 height=265></A> </P>
<P>A wizard will appear. Click Next to advance to the dialog box shown below. Check the box for <STRONG>Network Policy and Access Services</STRONG> and then click <STRONG>Next</STRONG>.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras6_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras6 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras6_thumb.jpg" width=618 height=467></A>&nbsp;</P>
<P>You'll see a dialog box with no options. Click Next to advance to the following dialog box. Check the box for <STRONG>Routing and Remote Access Services</STRONG>. Be sure the two checkboxes underneath it are checked and click <STRONG>Next</STRONG>.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras8_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras8 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras8_thumb.jpg" width=622 height=470></A> </P>
<P>Click the <STRONG>Install</STRONG> button to install RRAS. When the installation finishes, click the <STRONG>Close</STRONG> button.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras9_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras9 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras9_thumb.jpg" width=622 height=470></A> </P>
<P>Once RRAS is installed, use the Server Manager to configure it. Right-click on <STRONG>Routing and Remote Access</STRONG> and select <STRONG>Configure and Enable Routing and Remote Access</STRONG>.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras11_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras11 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras11_thumb.jpg" width=431 height=436></A> </P>
<P>Select <STRONG>Network address translation (NAT)</STRONG> and click <STRONG>Next</STRONG>.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras12_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras12 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras12_thumb.jpg" width=523 height=432></A> </P>
<P>Select your wireless network adapter and click <STRONG>Next</STRONG>.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras13_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras13 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras13_thumb.jpg" width=524 height=433></A> </P>
<P>Select the network interface you assigned the static IP address to and click Next.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras14_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras14 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras14_thumb.jpg" width=524 height=433></A> </P>
<P>Select <STRONG>Enable basic name and address services</STRONG> and click <STRONG>Next</STRONG>.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras15_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras15 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras15_thumb.jpg" width=525 height=433></A> </P>
<P>Click <STRONG>Next</STRONG> and then click <STRONG>Finish</STRONG> on the screen that follow.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras16_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras16 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras16_thumb.jpg" width=525 height=433></A> </P>
<P>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.</P>
<P><A href="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras18_2.jpg"><IMG style="BORDER-RIGHT-WIDTH:0px;BORDER-TOP-WIDTH:0px;BORDER-BOTTOM-WIDTH:0px;BORDER-LEFT-WIDTH:0px;" border=0 alt=ras18 src="http://sqlblog.com/blogs/john_paul_cook/WindowsLiveWriter/UsingWirelesswithHyperV_FB4D/ras18_thumb.jpg" width=442 height=517></A> </P>
<P>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.</P><img src="http://sqlblog.com/aggbug.aspx?PostID=5753" width="1" height="1">firewallHyper-VnetworkVirtual PCvirtualizationWindows Serverwireless