Categories: VPC
Posted by
yeejie on
7/7/2009 8:00 PM |
Comments (0)
<Pasted from http://tednyberg.com/dotnet/2009/4/2/configure-a-network-between-a-host-computer-and-a-vpc,-virtual-pc>
Running a local LAN with your computer and any VPCs only
I’ve been getting some questions about how to set up a network between a VPC and the host computer without having access to an actual network. For example, I’m writing this post while sitting on an airplane, and this flight doesn’t come with an internet connection. However, I can still run a local network making the host computer and the VPC available to one another through TCP/IP. The answer is spelled Loopback Adapter.
Installing the Loopback Adapter
These instructions are for Windows Vista, but you can find instructions for Windows 2000 and Windows XP in the Virtual PC help documentation.
First, click Start » Control Panel » Hardware and Sound » Device Manager.
Next, click the Action menu and Add legacy hardware:
Click Install the hardware that I manually select from a list and then click Next:
Select the Network adapters option and click Next:
In the Manufacter list, select Microsoft, select Microsoft Loopback Adapter and then click Next:
Click Next again to start installing the loopback network adapter:
When it’s completed, click Finish. You’ll now have an additional network adapter available:
Right-click the loopback network adapter and click Properties. Next select the Internet Protocol Version TCP/IPv4 settings and click Properties.
Now specify any private, non-routable static IP address (for example one starting with 192.168.x.x) that you want for the host computer:
Enabling the loopback adapter in your VPC
Start your VPC and then click the Settings option on the Edit menu:
Note: the VPC doesn’t have to be running, you can access these settings from the Virtual PC Console as well. In fact, if you want to increase or decrease the number of network adapters the VPC should have, you need to keep the VPC shut down while modifying the settings. Virtual PC doesn’t allow "hardware changes" while the VPC is running.
Click the Networking option and then set at least one network adapter to use the Microsoft Loopback Adapter:
Once you’ve configured the VPC to use the loopback adapter you need to specify a static IP for the VPC as well:
Now, just to make sure, I’ll try and ping the VPC from my "real" computer to see that we have network connectivity despite not having access to a real physical network:
Note that you can use either the static IP we specified within the VPC or the VPC’s computer name to connect to it.
Big THANKS to Ted Nyberg for saving my day!
***
If you encountered problem in Win Vista or Win 7, please refer to http://beta.blogs.microsoft.co.il/blogs/baruchf/archive/2009/07/09/windows-7-amp-network-loopback-adapter-settings.aspx or below:
Pinging from host to guest worked but pinging back from guest to the host returned time out. After searching I found the problem is that Windows 7 declares this network connection as undefined public network and blocks connections from it, but there is no way to change it to home or work network because this option is unavailable 
After spending a lot of time I found this great post that describes the same problem on vista and a way to solve it: set your loopback adapter connection (host) default gateway to the IP of the virtual machine then the network will be defined and you can change it to home or work .
Thanks to Baruch Frei!