Monday, August 31, 2009

Unable to connect to internet in Virtual PC

I ran into this issue recently. I installed Microsoft Virtual PC on my host machine running Windows XP. Created a new Virtual PC and installed Windows Service Pack3 on it. By default the Networking adapter is set to the physical network adapter of the host machine. Everything looked good so I fired up my new VPC, opened the browser and tried accessing some site. Problem!

So I decided to change the Network work adapter of the VPC to Shared Netowrking (NAT). In this mode VPC would share the network connection available on the host machine instead connecting directly to the network adapter on the host machine. But still no luck.

In both cases I could ping the host machine from the Virtual PC. Which meant there is network connection on VPC but something is preventing internet connections. The first thing to look at in such scenario would be Firewall. So I decided to quickly check if disabling the firewall on the VPC would do the trick. That didn't make any difference. Note disabling firewall is not a good idea. I was just using to narrow the issue down. So I turned the firewall back on on the VPC.

The next step was to look at the Firewall on the host machine. Instead of disabling the firewall this time I looked at the Exception tab of the firewall configuration window. This tab basically lists the applications that have previlages to pass through the firewall. I decided to add Microsoft Virtual PC into the list. After adding it to the list, clicked on the "Add Port" button and added port 80. That's it!!! The problem is fixed. Hope this helps some one. Drop a line if this worked or you have any comments.