Enabling Change Block Tracking (CBT) on a vSphere 5.1 VM with PowerShell/PowerCli
In one of my previous post, I created two PowerShell functions to enable Copy/Paste operations on VMware vSphere 5.1 between a Guest OS and the vSphere Client remote console. Today we’ll use a very similar piece of code to Enable Change Block Tracking (CBT) on one or more Virtual Machines.
I already talked about CBT in the past, but I just wanted to create re-usable PowerShell functions that will help me when I need it.
What is Change Block Tracking again?
Changed Block Tracking (CBT) is a feature from VMware used for Virtual Machine incremental backup. Similar to snapshot differentials or delta differencing, Change Block Tracking backs up only the blocks that have changed, rather than backing up every block of every VM in the infrastructure.
CBT requires :
-
VMware ESX/ESXi hosts at version 4.0 at least or newer,
-
Virtual Machine(s) must be at the virtual hardware version 7 or newer,
-
Input/Output (I/O) operations go through the ESX/ESXi storage stack:
-
NFS Supported
-
VMFS Supported (Local disk, SAN or iSCSI)
-
RDM in virtual compatibility mode Supported
-
RDM in physical compatibility mode NOT Supported
-
CBT must be enable for the Virtual Machine,
-
Virtual Machine storage must not be (persistent or non-persistent) independent disk (unaffected by snapshots),
-
Finally the Virtual Machine must go through a stun-unstun cycle (power on, resume after suspend, migrate, or snapshot create/delete/revert) before the reconfiguration takes effect.
For CBT to identify disk sectors in use with the special "*" change ID, the following are required:
-
The virtual disk must be located on a VMFS volume, backed by SAN, iSCSI, or local disk. RDM is not VMFS,
-
The virtual machine must have zero snapshot when CBT is enabled.
Other Important points about CBT:
By default the Change Block Tracking (CBT) is disabled.
Administrators can enable CBT and some backup tools enable it automatically (It was the case for me using Symantec NetBackup). If any blocks were changed since the last backup, Changed Block Tracking tags them and stores the information in a CTK file in the Virtual Machine folder by default. CBT tells the vSphere or third-party backup tool to copy these changed blocks, avoiding copies of the entire VM. This reduces the amount of data undergoing backup.
Once enabled, the three following entries will appear in the “Configuration Parameters” values of the Virtual Machine.
This enable CBT on your VM.
ctkEnabled= true</td></tr></tbody></table>
|
Leave a comment