DNS name of virtual machine

dnsNetworkvirtualizationvmware

I need to reliably access the SqlServer running on my Windows 7 VM. I've tried setting a static ip and reserving that ip for the machine in VMWare's Nat config but that cuts off WAN access from the VM. Right now I am just editing my database url every time I restart the VM. Does anyone have a complete set of instructions on how to configure an internal NAT static IP in VMWare Fusion 5.0?

Best Answer

You'll have to manually edit VMware's network preferences and add static hosts to get this working. The file necessary can be found at /Library/Application Support/VMware Fusion/vmnet8/dhcpd.conf. The file is read-only so chmod it writeable first.

For each static host you'll have to add the following and change the hostname, MAC address and IP to your VMs:

host yourhosthere {
    hardware ethernet 11:22:33:44:55:66;
    fixed-address 192.168.87.100;
}

I'd recommend selecting the IP from outside the DHCP range, which is defined in the same file on the row starting with range.

After this you have to restart VMware services with sudo "/Library/Application Support/VMware Fusion/boot.sh" --restart

As for the DNS name, after you have a static IP you can add it to your /etc/hosts file using the following syntax:

192.168.87.100 yourhosthere