2
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.
2When 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 – 2012-08-16T00:45:16.333
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 – 2012-08-16T02:50:31.060
Use DHCP instead of setting the IP address manually. – David Schwartz – 2012-08-16T07:40:08.400
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 – 2012-08-17T05:03:54.953
1It 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 – 2012-08-17T08:04:26.230