Moving VMware image from one directory to another.

I had to move a VMware image from one hard disk to another because I wanted to add more space to it (I use VMWare Player).

I just copied the whole VM folder to the new directory, added the copied VM to VMware, and ran it. It asked if the VM had been copied or moved. I elected to say "copy" because I didn't want it to do anything to the original VM in case I had to return to it. In retrospect, "move" would have been better than "copy", as we shall see.

The new VM ran, but couldn't connect to the Internet. The issues were the following:

  • The MAC address changed. I had to register the new MAC address with my corporate network.
  • eth1 no longer existed, but eth2 did. I had to replace "eth1" with "eth2" in the file /etc/network/interfaces.

In retrospect, "move" would have been better than "copy", because the MAC address would not have changed. Possibly the ethernet interface would have remained the same as well.