CBT bug on Revert Snapshot

Veeam has found a new bug in VMware Change Blocking Track (CBT) that can/will corrupt backups.

When doing a revert on a snapshot, the CBT “QueryChangedDiskAreas API” will return incorrect data, to the backup solution.

VMware has published a KB71155 about the problem and says that this i is working as designed!

So the solution/workaround i to do a CBT reset whenever you do a “revert snapshot”, this can be done with this script.

import-module -name vmware.powercli
connect-viserver <vcenter FQDN>
$vm = get-vm -name <VM name>
$vmview = $vm | get-view
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.changeTrackingEnabled = $false
$snap=$vm | New-Snapshot -Name 'Disable CBT'
$snap | Remove-Snapshot -confirm:$false

Notes: The script does not enable CBT, it assumes that the backup will do this on next backup.

Notes: I will create a alarm at my costumers to warn them of this, that looks like this. To create the alarm the event that you should use is: com.vmware.vc.vm.VmStateRevertedToSnapshot

I hope that VMware will fix this, and the solution can just be to do a CBT reset after the revert snapshot.

Share This:

3 thoughts on “CBT bug on Revert Snapshot

  1. This is a great post, thank you. Could you please elaborate more on how exactly to create the vcenter alarm on all VMs? This would be awesome because I was thinking of how to know whether someone does it or not etc. I just need real step by step.

    1. Just create the alarm on the vCenter object, the top most object in the object tree on the the left i the vSphere Client.

Leave a Reply

Your e-mail address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.