A VMware backup receives warnings similar to the following:
Unable to use Changed Block Tracking (CBT) on ___. Attempting to disable and re-enabled CBT.
Could not re-enable Changed Block Tracking (CBT) on ___. Any thin disks on this VM will be backed up as thick disks.
Explanation
The Backup Agent uses VMware's Changed Block Tracking (CBT) driver to determine which parts of a virtual machine's virtual hard disks to back up. If the Backup Agent is unable to read the changed blocks from the driver, it will try to re-enabled the CBT driver to reset tracking. If this cannot be done, you will receive the error noted above and all virtual hard disks will be backed up as thick disks.
Resolution
Manually Resetting CBT
If the Backup Agent is unable to reset CBT during the backup, it will likely necessitate you reset CBT manually while the virtual machine is offline. The procedure for doing this is as follows (as adapted from this VMware article):
- Open the vSphere client.
- Right-click the virtual machine you want to reset CBT for and click Power Off.
- Right-click the virtual machine again, go to Snapshot and click on Snapshot Manager.... If you see any active snapshots, consolidate them before moving on to the next step.
- Right-click the virtual machine and click on Edit Settings...
- Click the Options tab, go to the General section, then click on the Configuration Parameters button.
- Disable CBT for the virtual machine by setting the
ctkEnabled
value tofalse
. - Disable CBT for individual virtual disks attached to the virtual machine by setting the
scsix:x.ctkEnabled
value for each attached virtual disk tofalse
. Inscsix:x.ctkEnabled
, the firstx
represents the SCSI controller ID and the secondx
represents the SCSI device ID of each virtual disk. - Open the virtual machine's working directory using the Datastore Browser or ESXi shell. For help locating the working directory, see this resource.
- Make sure there are no snapshot files (
.delta.vmdk
) present in the virtual machine's working directory. If you see any, follow the directions here to remove them. - Delete any
-CTK.VMDK
files in the virtual machine's working directory. - Right-click the virtual machine and choose Power On.
The Backup Agent tries to re-enable CBT the next time a backup runs. This process is usually successful after manually resetting CBT, but if you'd like to re-enable it yourself, you can do so with these instructions.
Resetting CBT With PowerCLI
These instructions are adapted from this VMware article. The PowerCLI script for resetting CBT for a specific virtual machine is:
$vm="VM_Name"
$vmtest = Get-vm $vm| get-view
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
#disable ctk
$vmConfigSpec.changeTrackingEnabled = $false
$vmtest.reconfigVM($vmConfigSpec)
$snap=New-Snapshot $vm -Name "Disable CBT"
$snap | Remove-Snapshot -confirm:$false
# enable ctk
$vmConfigSpec.changeTrackingEnabled = $true
$vmtest.reconfigVM($vmConfigSpec)
$snap=New-Snapshot $vm -Name "Enable CBT"
$snap | Remove-Snapshot -confirm:$false
To reset CBT on multiple virtual machines, use the script and directions found here.