If you have the need to make a clone of an existing Virtual Machine on VMware Vshpere 5.5, I will walk you through the simple process. This is useful for making a full backup, performing an upgrade, creating a clone/image to start from, or just moving the VM to a new host or datastore. Let’s make a virtual machine clone.
I set up my VMware vSphere 5.5 host a few years ago and it has been humming along very well. I’ve been running both Windows and Linux virtual machines to serve a variety of different functions as wells as just being a test bed for experimentation. I have a few Linux machines that are a few LTS versions old. The best method I have found to upgrade these, while at the same time keeping the current instance running is to clone the existing instance and perform the upgrade on the clone. Once I’m happy with the upgrade on the clone, I’ll decommission the parent instance and start using the clone in production.
We all know that it is important to keep regular backups, of, well, everything. However, I haven’t been thrilled with the options available with making backups in vShpere. I have tried a few free commercial backup solutions, but most have been slow and overly complicated. I’ve found that making a clone and saving it on external storage has yielded the simplest solution. The only downside with doing this has been the lack of an automated solution. You will have to remember to manually create the backup.
vSphere Snapshot Problems
I have also had less than stellar results using the built in snapshots manager for vShpere. While this isn’t a backup, snapshots are useful for setting checkpoints before you make major changes to the system that you can fall back to in case something goes wrong. On multiple occasions, creating snapshots has actually rendered my virtual machine instances unusable. Usually what happens is that after creating a snapshot, the VM will no longer boot. In order to restore them, I had to manually adjust the VMX files to point to the previous snapshot VMDK just to get the VM instance to launch. I would usually end up with stranded snapshots which eventually just turned the directory of VM files into a mess. This is another reason why I prefer to do regular full backups. Doing full backups could become an issue if you have a large amount of virtual machine instances, and if they are very large or thick provisioned. None of my instances are, so hasn’t been a concern for me.
Create the vSphere Virtual Machine Clone
- First, open the DataStore in the vSphere client that your VM is located on
- If you are creating a clone on the same vSphere host, copy the VMX and VMDK files from the root folder of the machines you want to clone
- Create a new directory in your DataStore root. This can be on the existing DataStore, or on a different DataStore on the same host. I usually create the folder with the same name of the parent VM and append “_cloneXX” to the end so I know which one is the latest virtual machine clone. You can follow whatever naming pattern you like.
- Paste the VMX and VMDK files into the new directory
- After the files have copied into the new directory. You need to add them to the VM Host Inventory. You can add them by right clicking on the new VMX file and select “Add to Inventory”
- The new virtual machine clone will now display in your Host inventory
- Because you copied the VMX files, all of the settings of the parent will be set in the clone. You can adjust this if necessary
- You can now start the clone VM
- You will be prompted by vSphere as to where the VM came from, you can select that you copied it
- The machine should start as normal
- The MAC addresses of the NICs on the virtual machine clone will change, so you will need to update your network setting appropriately