I run a development Web server on my Powerbook and frequently test content on Windows browsers via Virtual PC.
The Problem
When I'm not connected to a network (as is often the case for PowerBook users), I don't have an IP address (except 127.0.0.1), so VPC has no address it can use to connect to my local server.
The Solution
Create an alias of your network IP address to the loopback interface (127.0.0.1). In the Terminal, type:
sudo ifconfig lo0 inet 192.168.0.1 netmask 255.255.255.0 aliasIP addresses have been changed to protect the innocent; replace 192.168.0.1 and 255.255.255.0 with your actual network IP address and subnet mask. VPC (or anything else on your computer) should now be able to connect sans network, but using your network IP address (192.168.0.1 in our example). To remove the alias, type:
sudo ifconfig lo0 inet 192.168.0.1 netmask 255.255.255.0 -aliasNOTE: For any of the above to work properly, you will need to fix a now infamous VPC network bug. If you haven't done so already, enable the Scripts menu in VPC preferences and run the "Set Networking Type" script, and change the network type to Shared Sockets.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20030911124758992