Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have Windows 7 installed as my primary operating system, on a laptop that's on my home network (wireless).

I'm using Microsoft Virtual PC 2007 SP1 to run a virtual machine of Windows XP SP3, in which I want to access the Windows 7 instance, both to browse a shared folder and access the local Apache server.

So far I can ping my Windows 7 IP address (IPv4) and access the apache server through the web browser through HTTP.

However using my machine name never seems to work. Pinging it fails, and I can't access my apache server using it either.

The problem seems to be something to do with my machine's name being registered under IPv6 rather than IPv4.

I'm at a loss what to do. Should I try to set up IPv6 on the virtual machine? Not sure how to go about that. Or maybe I should somehow get my machine name on Windows 7 to work with IPv4?

Although I think it already does, because I can ping it from a separate box (running Ubuntu), which is only registered under IPv6.

share|improve this question
    
Do you have a DNS server? –  Sam Jul 20 '09 at 10:34

2 Answers 2

up vote 2 down vote accepted

If you do not have DNS or WINS setup to do name resolution, and this is the one computer that you want to be able to ping/resolve by name, a quick fix would be to just add an entry to your hosts file (located in %SystemRoot%\system32\drivers\etc) on the Windows XP VM pointing to the Windows 7 host. It would look like:

192.168.1.5     mywin7hostname

Edit: Okay, based off of your response about IP addresses being assigned via DHCP, you still have a couple of options. The following TechNet article walks through the windows hostname resolution process: http://technet.microsoft.com/en-us/library/bb727005.aspx

When you are trying to ping the Windows 7 hostname, it is not local, you do not have a DNS server which rules out options 2 and 3, you do not have a WINS server which rules out options 4, and 5, which leaves you with NetBIOS broadcasts as the only way for your client to locate the Windows 7 hosts. Go into your Firewall on the Windows 7 box and make sure that you have Network Discovery (NB-Datagram-In) and Network Discovery (NB-Name-In) enabled for the network profile that includes the Windows XP box.

alt text

Alternately (and probably easier), assign a static IP (or use DHCP address reservation on your router) to the Win7 box in IP range of your network and use the hosts file on the Windows XP VM. Even in a managed corporate network with DNS and WINS, servers tend to be assigned static IP addresses for exactly this reason.

share|improve this answer
    
The problem is, all my machines (virtual and physical) are assigned IP's through DHCP. So this is why I wanted all access to be by DNS name in the first place, because I'm developing web pages that contain certain absolute URL references, and I don't want to have to keep updating them every time I reboot my laptop. –  jonathanconway Jul 20 '09 at 6:09

Try just switching off your router for a bit, then back on. It worked for me. Somehow the router had lost the relationships between the computer names and their ip addresses, and resetting it caused it to discover them again.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.