views:

1098

answers:

2

I can't access my host machine from my guest machine using the computer name (i.e. WINS). I can access it using whatever IP address it happens to have at the time, but I need a consistent way of accessing it (even if I'm not online).

I have a Windows Server 2003 guest virtual machine and a Vista host. I'm using Shared Networking (NAT). I'm running Microsoft Virtual PC 2007 SP1. I've set my DNS server to 192.168.131.254 and everything else is DHCP. Any help is appreciated.

+1  A: 

Make a domain name in the windows hosts file on the Vista Host system:

 C:\WINDOWS\system32\drivers\etc\hosts 

 172.16.16.4    localserver

Here is the blog that explains it:

http://blog.flexuous.com/2007/02/04/virtual-pc-ip-routing-enabling-vpc-nat-loopback-connector-at-the-same-time/

Fire Crow
A: 

You didn't mention the network setup. If you happen to control the router, such as a home network, you've got a couple of options.

  • Dynamic DNS updates. When a host gets it's IP address via DHCP, it can automatically update it's DNS records with it's hostname. This is similar to services such as dyndns, but also works on your local network without net access.
  • Static DHCP Assignments - Assign an IP address to MAC Address relationship on the router, so that every time a DHCP request is sent out from that MAC, it will always get the same IP address. Then you can add this address to your hosts file for access via name.

Another option would be to setup a static loopback device on both the host and the guest and place them in their own private network. That way, the IP address will never change. Then, you can add the corresponding IP addresses into the host files of each respective machine to reference by name.

Dave K