Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm winning Windows XP under VMWare Fusion on my OSX 10.7.4 in bridged mode.

I need to be able to reference the Guest (XP) via a hostname, as it hosts a server i use in development. To achieve that, I have gone into the XP network settings and specified for it to use a Static IP address. Then I edit my Hosts (OSX) /etc/hosts file to add a hostname entry for that ip address. This all works fine, however when I do it that way, the XP does not have internet access. It seems that it has no DNS resolution (ie i can ping external IP addresses, but not hostnames).

When I have XP use dynamic IP's via DHCP, the internet works perfectly - but then I can't reference it via it's hostname.

Can anyone suggest how I can achieve both here? Is there a way I can have the guest with a static ip, but automatically use the DNS that my host uses?

Note that I don't mind whether it's bridged or NAT. Should I be using NAT instead? The key things I require are: 1. The Guest XP must be able to be referenced via a hostname from the Host OSX. 2. The Guest XP must have internet access.

Any help would be greatly appreciated.

share|improve this question
2  
When you set the IP address manually, you also need to manually set all the other things that DHCP sets, such as the DNS servers to use. –  David Schwartz Aug 16 '12 at 0:45
    
Ahh yes thanks! I realised I can set the DNS to be 192.168.1.1 (ie my router) and that works ok. But the problem with this set up of hardcoding the static ip and dns in the Guest VM is that what if I take my computer to a different network with a different ip range, it would fail? Is there any way to work around this? Is NAT setup the correct approach? –  Manachi Aug 16 '12 at 2:50
    
Use DHCP instead of setting the IP address manually. –  David Schwartz Aug 16 '12 at 7:40
    
My #1 requirement was "The Guest XP must be able to be referenced via a hostname from the Host OSX". If I use DHCP, am I able to do this? Won't the Guest XP get a different IP address each time? (so i coudln't use an /etc/hosts host entry on the Host OSX) –  Manachi Aug 17 '12 at 5:03
1  
It all depends how you configure the DHCP server. If you configure it to give the same IP address each time, then that's what it will do. –  David Schwartz Aug 17 '12 at 8:04
add comment

1 Answer

I had problems with this setup trying to tunnel into iisexpress using hostnames. Finally got things working using the following setup.

  1. Set vmware network to shared with mac (NAT)
  2. set guest (windows) network to dhcp note down ALL the settings dhcp assigns.
  3. change back to static and use those settings
  4. the gotcha for me was that i didn't notice the local domain prefix assigned to DNS under advanced options.

Now your mac (host) may be on dhcp and get a new ip address every time but the guest os will always have the same static ip address. This was essential for me as i work from a macbook pro and connect to different networks with different subnets.

hope this helps.

share|improve this answer
add comment

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.