Cloning virtual machines in vSphere series – Part 1: Types of clone

Reading Time: 4 minutes

Most of you already know how to clone virtual machines within vSphere, and I mean cloning from the vSphere Web client within vCenter but, beyond that, there are other types of clones you can use in vCenter like, Linked Clones or Instant Clones (aka Project Fargo/VMfork)

Due to the large content that can be discussed about each clone’s type, I decided to make a short series of posts talking about cloning VMs!

 

Types of clone

Here I will summarize each type of clone that exists in vSphere, some of them are used in different products or interfaces but in the end, all of them are accessible through PowerCLI.

Full clone

This is the “classic” clone you can perform in vSphere Web Client no matter which is the VM’s status (powered on or off), that you can perform a copy of the VM.

If you want to perform a consistent clone, it’s recommended that you power off the VM and then perform the clone.

This is an independent copy and has no dependency from the parent virtual machine after the clone is complete (meaning that you can remove the parent VM if you need it).

The main advantage is that you can have a reliable copy of the Parent VM (remember this is not a backup) if you want to replace it. As this is a full copy of the VM (it will copy the entire disk), this might take several minutes depending on the size of the VM.

After you perform it, remember that everything will be the same then, all configuration (SID, network configuration, hostname, etc.) within the VM will be identical hance, it can lead to problems if both VMs co-exist at the same time without the proper configuration.

FullClone
Full clone

Linked clone

Is a clone made from a snapshot of the Parent VM. This means that both VMs (the Linked clone and the parent VM) have in common virtual disks.

So, the linked clone is dependent on the parent VM, meaning that the linked clone needs access to the parent VM. The clone must be done while the Parent VM is powered off (as a best practice).

Once a linked clone is performed, changes on the parent VM doesn’t affect the linked clone and in the other way, changes in the linked clone don’t affect the original VM. Mainly the benefits of using linked clones are:

  • Saving disk space because only the differences between the origin snapshot and the linked clone are allocated and the fast.
  • Quickly deploy tens or hundreds of VMs in a fast way as it doesn’t need to copy the entire disk.

This is a technology commonly used in VMware Horizon View to provide desktop deployment (rapidly deploy a lot of VMs). The thing is that we can also use it with PowerCLI without having Horizon View and use it for more use cases.

LinkedClone
Linked clone

Instant clone

Similar to the linked clone, Instant Clone is like an improved version of linked clone technology. This is something “new” in vSphere 6.7 as is available through the API.

Like the linked clone technology, there is a parent VM which will share the disk with the clone (Instant clone) but, in this case, it will share the memory too (even if TPS is disabled).

There are two types of Instant Clones that I will explain in more detail in the next posts but, as a summary, you can do an instant clone from a source VM from a point in time and deliver many VMs (instant clones) as you want.

The Parent VM must be powered-on instead of powered off like other types of clones, in this way, it can provide even a faster way to deploy VMs because it will not require to power-cycle the Instant Clones.

As benefits, we will have the same as in Linked Clones technology plus memory efficiency (because it shares memory between VMs) and the ability to resume the VM in a point of time without power cycling the clone.

In the other hand, depending on which type of instant clone you can run with a lot of delta disks.

InstantClone
Instant clone

So…

I tried to summarize each clone’s type that we can perform within vSphere and if you want to read more, stay tuned to go in more detail in the coming series of posts related to cloning VMs within vSphere.