Veeam: ESXi 6.0 – CBT bug and fix(fix VMs and reset CBT) Part II

/, Virtualization/Veeam: ESXi 6.0 – CBT bug and fix(fix VMs and reset CBT) Part II

Veeam: ESXi 6.0 – CBT bug and fix(fix VMs and reset CBT) Part II

Continuing the ESXi 6.0 CBT(Change Block Tracking) issue, so that our backups and restore can work properly, CBT needs to be reset. This is a mandatory task that needs to be done to all VMs that are in the Backups jobs. Regardless of the Backup tool you use to backup your VMware environment.

Again, in our case we use Veeam and Veeam has a script that will reset CBT in all VMs that are poweron and with no snapshots on it(power off VMs and with snapshots will be excluded from the list of VMs that will have the CBT reset).

What is consisting this CBT fix in the VMs(regardless the Guest OS). This will reset the CBT so that backups can start from zero and have a proper consistence in the incremental backups.

Tasks performed by this script:

•    Disable CBT in the VM

•    Create a VM snapshot

•    Remove VM Snapshot

•    Enable CBT in the VM

We can download the Veeam script HERE

But in our case there was an issue with a code line in that script. Script could not identify VMs with the CBT enabled. VMs list was null.

After create a small and simple script to test CBT enable, or disable in a VM I found the problem Veeam script.

This is my script:

$VMCBT = Get-Cluster "Cluster Test" | get-vm 


foreach ($VMCBTs in $VMCBT){

if ($VMCBTs | where {$_.ExtensionData.config.ChangeTrackingEnabled -eq $true}){
Write-Host ($VMCBTs.Name) ‘ CTB Enable’

} else { Write-Host ($VMCBTs.name)  ‘ CBT is disable’}
}

In Veeam script found the issue in this line:

$ivms = get-vm | ?{$_.ExtensionData.Config.ChangeTrackingEnabled -eq $true};

With this $ivms always returns null, since there was no condition to check if VM had CBT enabled, or not.

So add a where condition to the line, fix the issue and all VMs with CBT enabled were listed.

$ivms = Get-Cluster "Cluster Test" | get-vm | where ' {$_.ExtensionData.config.ChangeTrackingEnabled -eq $true};

Updated: Issue in the script was only found in the Powershell 2.0, updated to 3.x issue did fix the issue in that line.

Since I will run the script by Cluster and not in all vCenter, I add also the Get-Cluster option.

Hope this helps you to fix your CBT on your VMs also.

Note: Share this article, if you think is worth sharing.

By | 2017-12-30T02:50:12+02:00 December 4th, 2015|Backups, Virtualization|1 Comment

About the Author:

I am over 20 years’ experience in the IT industry. Working with Virtualization for more than 10 years (mainly VMware). I am an MCP, VCP6.5-DCV, VMware vSAN Specialist, Veeam Vanguard 2018/2019, vExpert vSAN 2018/2019 and vExpert for the last 4 years. Specialties are Virtualization, Storage, and Virtual Backups. I am working for Elits a Swedish consulting company and allocated to a Swedish multinational networking and telecommunications company as a Teach Lead and acting as a Senior ICT Infrastructure Engineer. I am a blogger and owner of the blog ProVirtualzone.com

One Comment

  1. […] If you already have VMs with this issue, besides the workaround to prevent the issue, you will need to reset the CBT. I have written a article regarding how to do this in the previous CBT issue: CBT bug and fix – Reset CBT. […]

Leave a Reply

%d bloggers like this: