SharePoint etc.

SharePoint and other trendy MSFT products

Setting up Network for Hyper-V VM

Background

I worked on building a SharePoint 2010 Hyper-V image this weekend.  In order to get the image installed, I had to ensure that my wireless network connection on the Hyper-V host could be shared with the Virtual Machines I created.  The procedure I followed can be found here

Process

This procedure was used while creating an image with Windows Server 2008 R2 with the Hyper-V role added.  The host OS uses a DLink wireless connection to my home internet.  This wireless connection was shared.

  1. Make sure your VM has no existing network device associated
  2. Create a new “Internal” virtual network adapter.  Give it an obvious name.
  3. Open up the Network and Sharing Center and click on the link to the adapters.
  4. Ctrl+Click your Internet adapter for the host OS and the new Internal adapater (identified by its obvious name)
  5. Now with both connections highlighted, right click and choose to Bridge connections
  6. Once bridging is complete, go back to Hyper-V and add the internal connection to a VM.
  7. When the VM is booted, it will see and share the internet connection

Note:  This process may only work for a single VM.  I saw comments indicating it may not share across multiple virtual network adapters.  In that case you may need to use the ICS (Internet Connection Sharing) solution.  (http://bryantlikes.com/SettingUpHyperVVirtualNetworking.aspx)

Lessons Learned

  • Do not bridge a connection that is already assigned to a VM.  I tried this and it failed to pick up the internet connection. (Create the internal virtual network first and do not associate it with a VM!)
  • If you remove the bridge, delete the remaining bridge adapter.  I did not immediately delete the bridge remnant from the adapters list and until I did, my local host could not access the internet.
  • ICS may be a better solution, but bridging works quick if you only need on VM

May 11, 2010 Posted by | Hyper-V | Leave a comment