Andrew Connell [MVP SharePoint]
1728 Posts |  46 Articles |  5281 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
AC's Blog Quick Links
SharePoint Quick Links
Article Categories
Archives
February, 2012 (2)
January, 2012 (12)
December, 2011 (6)
November, 2011 (3)
October, 2011 (17)
September, 2011 (8)
August, 2011 (6)
July, 2011 (7)
June, 2011 (13)
May, 2011 (9)
April, 2011 (15)
March, 2011 (1)
February, 2011 (6)
January, 2011 (5)
December, 2010 (11)
November, 2010 (6)
October, 2010 (12)
September, 2010 (5)
August, 2010 (4)
July, 2010 (5)
June, 2010 (6)
May, 2010 (11)
April, 2010 (11)
March, 2010 (9)
February, 2010 (9)
January, 2010 (3)
December, 2009 (10)
November, 2009 (15)
October, 2009 (15)
September, 2009 (7)
August, 2009 (4)
July, 2009 (10)
June, 2009 (8)
May, 2009 (2)
April, 2009 (9)
March, 2009 (6)
February, 2009 (16)
January, 2009 (6)
December, 2008 (12)
November, 2008 (12)
October, 2008 (27)
September, 2008 (13)
August, 2008 (14)
July, 2008 (14)
June, 2008 (12)
May, 2008 (23)
April, 2008 (12)
March, 2008 (15)
February, 2008 (13)
January, 2008 (12)
December, 2007 (10)
November, 2007 (8)
October, 2007 (15)
September, 2007 (20)
August, 2007 (21)
July, 2007 (16)
June, 2007 (8)
May, 2007 (25)
April, 2007 (16)
March, 2007 (18)
February, 2007 (18)
January, 2007 (12)
December, 2006 (16)
November, 2006 (13)
October, 2006 (18)
September, 2006 (22)
August, 2006 (27)
July, 2006 (23)
June, 2006 (23)
May, 2006 (23)
April, 2006 (9)
March, 2006 (17)
February, 2006 (15)
January, 2006 (23)
December, 2005 (31)
November, 2005 (32)
October, 2005 (38)
September, 2005 (53)
August, 2005 (30)
July, 2005 (63)
June, 2005 (30)
May, 2005 (59)
April, 2005 (29)
March, 2005 (74)
February, 2005 (27)
January, 2005 (22)
December, 2004 (32)
November, 2004 (42)
October, 2004 (39)
September, 2004 (20)
August, 2004 (14)
July, 2004 (27)
June, 2004 (40)
May, 2004 (5)
April, 2004 (6)
March, 2004 (16)
February, 2004 (26)
January, 2004 (23)
December, 2003 (7)
November, 2003 (14)
October, 2003 (20)
September, 2003 (4)
Post Categories
Add to Technorati Favorites

Managed Windows Shared Hosting

Those of us who use Hyper-V for development know of the challenge we face when we try to copy files or talk to the guest virtual machine or have the guest VM access the host machine. It’s frustrating because it was so easy to do in VirtualPC or VMWare Workstation as we had the easy copy files to and from the desktop just like we can do with Remote Desktop.

There is a way around this though… it’s a simple networking trick. Now, I’m a bit of a networking-idiot and had to get Todd Baginski and Maurice Prather to help me with this (so big shout out to them), but it’s actually quite simple and I after explaining it to to quite a few people, I’m documenting it so I have a URL to point to where others can do it on their own. Hopefully this helps you.

Disclaimer – I fully recognize there are other ways to achieve this. I’m sure there will be plenty of comments from people who have their own method… that’s just fine. Use whatever method works for you… for me, this method works great and it’s what I use.

Overview

Basically what you’re going to do is create a new virtual network on your Hyper-V machine, add a new NIC to your VMs and then put them on the same network.

Step 1 – Create a new virtual network

The first thing you need to do is create a new virtual network. From within Hyper-V, select Virtual Network Settings. Create a new INTERNAL network and leave all the default options. I like to call my virtual network INTERNAL.

What this does is create a new network within Hyper-V and creates a virtual NIC adapter on the host machine.

Step 2 – Configure the NIC on the host machine

With the virtual NIC created on the host, you want to change his IP settings. I put mine on a network I know I never use:

  • IP – 192.168.1.20
  • Subnet – 255.255.255.0

Leave everything else blank / default. The other thing I do is rename this NIC adapter to Hyper-V INTERNAL to make it easy to find later.

At this point the host machine is setup and ready for action!

Step 3 – Add a new NIC on the guest machine

Now it’s time to setup the guest. First, shut down the guest machine so that it’s not running or in a saved state.

Then, modify the settings of the virtual machine (right-click the virtual machine and pick settings). In the settings dialog select Add New Hardware at the top of the left-panel and select the network you created in step 1 above. Leave all settings as the default options.

With a NIC added to the VM, start the VM up.

Step 4 – Configure NIC on the VM

When the VM is turned on, you can now configure the new network adapter. Change his IP settings to put him on the same subnet but with a different IP than the host. For instance:

  • IP – 192.168.1.21
  • Subnet – 255.255.255.0

Again, leave everything else blank. Also, just as above, I like to rename this NIC to make it easier to find in the future.

* NOTE 1 – If you already have multiple NICs listed, it’s hard to figure out which one you need to modify as they all show the same adapter type. The way I figure out which is the correct one is change the one that has the highest number (like Local Network Connection 5) & test. If that doesn’t work, I undo my changes and try another one and just follow the process of elimination. How do you know if it works? See step 5 below.

* NOTE 2 – At times I’ve had to recycle the NIC to have the changes take effect. You can do this by simply disabling and then enabling the NIC you just changed.

Step 5 – Test file access & RDP

Now you’re likely good to go! There are two ways I utilize this:

  • File system – from either machine you open Windows Explorer and type \\192.168.1.[###]\C$ where the [###] is the IP of the machine you’re trying to reach. Be patient as it can take a minute to come back and prompt you for credentials.
  • Remote Desktop – this is my preferred way of working with the VMs. From the host I use Remote Desktop, connecting using the IP we added to the VM, to get a full screen mode with richer copy/paste between the host and the guest OS.

Hope this helps someone!

posted on Wednesday, September 30, 2009 7:34 AM

Feedback

# re: Allowing a host machine to talk to guest VM’s in Hyper-V (and vice versa) 9/30/2009 7:47 AM Matthijs Hoekstra
Gravatar Another trick you can use is to add another network which connects to your internal network (which in my case uses DHCP). That way you can access the internet from the virtual machines AND you can RDP from all your workstations on your network.

# re: Allowing a host machine to talk to guest VM’s in Hyper-V (and vice versa) 9/30/2009 7:59 AM Jeremy Thake
Gravatar With WIndows 7 and Windows Server 2008 R2 you can also RDP to a machine and share your hard drives and other resources...this saves configuring this stuff too! ;-)

# re: Allowing a host machine to talk to guest VM’s in Hyper-V (and vice versa) 10/2/2009 3:58 PM Eric Kraus
Gravatar Great post! Another method that has helped specifically with bridging wireless adapters to my guest VM in Server 2008/Hyper-V: sqlblog.com/.../using-wireless-with-hyper-v.aspx



# re: Allowing a host machine to talk to guest VM’s in Hyper-V (and vice versa) 10/3/2009 9:12 PM Ivan Sanders
Gravatar Andrew All of you guys all rock!!!

I wish Maurice would blog and create more tools like the good old days....

Thank you ALL for your constant illumination and support of the SharePoint community...

It took me a few hours of poking around with a sniffer, and my solution was a hack... Yours is clean!!!


Cheers,



# re: Allowing a host machine to talk to guest VM’s in Hyper-V (and vice versa) 10/3/2009 9:41 PM AC [MVP MOSS]
Gravatar Ivan-
If it was "my" solution I'd take credit, but I've really got to give credit to Maurice and Todd for pointing me in the right direction.

# re: Allowing a host machine to talk to guest VM’s in Hyper-V (and vice versa) 6/16/2010 12:30 PM Don
Gravatar Does anyone have this info for an ESXi Server ver4.0 ? I'm using the Free Lic Version of ESXi Server. I have the Uverse AT&T Network. But what i will be doing is changing the Uverse Router into a Modem. And use my Linksys Router for my Network interface. I want to setup a home network. I have windows server 2008r2 and Sql server 2008 r2. I have created My Domain with Forrest. But when i try to join either a Server 2008 r2 or Workstation - windows 7 pro. I get DNS issues...
Please Help

# re: Allowing a host machine to talk to guest VM’s in Hyper-V (and vice versa) 9/25/2010 7:36 PM paul bruce
Gravatar i am a student who has just passed my AD DS test. i will like someone here to help me.i have been following your comments here. what i have is a 2008 r2 hyper-v host and 4 vms on it. i will like the vms to communicate with each other and access the internet from the virtual machines AND you can RDP from all your workstations on your network.
i use a wireless mobile usb internet adapter. you can please email me direct on thereismanny@gmail.com
thanks

# re: Allowing a host machine to talk to guest VM’s in Hyper-V (and vice versa) 8/23/2011 1:02 PM Greg Dorosh
Gravatar This network solution works perfectly. Thanks a lot!

Greg

Post Feedback

Title:
Name:
Email:
(email will not be displayed)
Url:
Comments: 
Please add 1 and 8 and type the answer here:    
All Comments Are Filtered & Moderated
Unfortunately comment spammers are just too effecient and are constantly dirtying up blogs with irrelevant and unwanted comments trying to improve their standing on search engines. All comments on this blog are moderated. I do not censor comments, but I don't approve comments with vulger language or those soliciting products. Most of the time comments are approved within a few hours of being submitted with the only exception when I'm traveling.

Why are you asking for my email address?
The only reason I'm asking for your email address, which isn't required to submit a comment, is to provide a gravatar if you've created an account for yourself and associated your email address with a small image. If you have a gravatar created for the email address you submit, it will appear next to your comment. Otherwise nothing will appear.

What is a gravatar?
A gravatar is a "globally recognized avatar." You can get more information about gravatars, as well as create your own for free, at www.gravatar.com. You can also view my gravatar here.


Copyright © 2003 - 2012 Andrew Connell
Creative Commons License 
This work is licensed under a Creative Commons License
Site design by Heather Solomon.

 
 
SharePoint 2010 Training
Looking for SharePoint 2010 training for developers, administrators, SharePoint Designer 2010 and end users? Look no further! My company, Critical Path Training offers the best SharePoint training around!