This post has been migrated from www.experimentsincode.com, we apologise if some of the images or content is missing

This post has been migrated, original date 11 Jun 2009 Today I had to setup a VM on my laptop using Virtual PC (currently doing some MOSS 2007 work), as part of this I wanted the my laptop to be able to request pages from the client VM. Normally straight forward, just go to the settings menu, select Networking and then Shared Networking and your away. However after doing this I couldn't access the VM. This was because my laptop was not on a network itself so the network port of my laptop was "Disconnected" and had no IP, without the host having a connection Shared Networking won't work. The solution instead was to use the Microsoft Loopback Adapter. This acts a fake network connection. To install it just go to Control Panel and Add Hardware. Select install manually and then select Network adapters, once the list loads up select Microsoft from the manufactures list and then Microsoft Loopback Adapter from the the Network Adapter list. Click next until your finished. Now if you go to Network Connections you should see a new connection, if you open the properties window beneath "Connect using" it should say Microsoft Loopback Adapter, while on this screen also ensure that TCP/IP is enabled. Now we need to update the VM settings to use it. Go back to the VM settings and the networking options and select Microsoft Loopback Adapter. Now if you test this you may find that it still doesn't work, and this is the not so obvious part. We have to configure the settings IP settings of the VM. First on the host machine open the command prompt and type
ipconfig /all
You want to look for the new connection you created and not down the IP, this value is need to configure the VM.
Now in your VM open Control Panel and select Network Connects. Now select the adapter you are using and open the properties window. From the list of items select the TCP/IP item. When the new screen appears enter select Use the following IP addresses. In the IP address enter an IP address, the first three number should be the same as the first three numbers from the the loopback adapter, the final number can be anything but the number the loopback adapter is using. In the Subnet mask enter "255.255.255.0", finally in the Default Gateway enter the IP of the loopback adapter. You should end up having something that looks like this: Click ok until all the screens are gone and you should now be able to connect from the host to the VM via the loopback adapter.