Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a web developer and most of my work from running CentOS or Ubuntu servers from VMWare Fusion on my Macbook. I interact w/ the servers wholly over SSH and like this set up very well.

One problem I am running into, however, is that when I switch between wireless networks, the IP Address of the virtual machines changes. This is a hassle because I have some scripts that mount my home folder of the virtual machine as drive, and when the IP changes, I have to manually figure out what it is and change things.

It would be great if I could assign a host name (?) to the VMs so that I can always do "ssh user@myvitualmachine" but I would be satisfied with setting it up so that the IP doesn't change.

How should I go about this?

share|improve this question
up vote 0 down vote accepted

I use Zeroconf for this. Install avahi-daemon on the servers and they announce themselves as "hostname.local." - you then just need zeroconf support in your clients. OS X have it built in, Windows get it with Apple Bonjour package. I am not certain about Linux, but perhaps avahi has client support.

share|improve this answer
In Ubuntu, zeroconf is enabled by default – dmityugov Sep 23 '09 at 9:30

You could use NAT instead of bridged networking. The dhcp Server built into vmware usually gives the same IPs to virtual machines. If you find out it does not you can assign a static IP address to them in a configuration file that is somewhere like /etc/vmware/networking/vmnet8/dhcp/dhcp.conf (it is not exactly that filename, especially you have to change the name of your virtual network device.

share|improve this answer

Your Answer


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.