Avoiding IP Conflicts When Using Virtual Machines

Standard

I thought I had mentioned this tip in a previous post but since a quick search didn’t turn it up I figured I’d add this as its own entry. Not long after I started using virtual machines on a regular basis at work I encountered an IP conflict with a VM and another machine on the network.

The cause was simple. The last time I had used the VM I chose to suspend its state. It retained the IP and tried to use it the next time I started it up.

The solution is also simple. I’ve used this method with both VMWare Fusion and Parallels Desktop for Mac. Every time I prepare to suspend a virtual machine I simply disconnect the VM’s network connection prior to suspending. This will cause it to release the IP. The next time the state is restored and the network is reconnected it should pull a new IP.

It’s worth mentioning that this really only applies to VMs that have IP addresses assigned via DHCP.

Advertisements