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 $vmview.reconfigVM($vmConfigSpec) $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.
I have a new post on how to create this type of alarm here: https://www.virtual-allan.com/how-to-create-vcenter-on-custom-event/
Notes: December 10th 2019
The newest patches from VMware for version 6.0, 6.5 and 6.7 has a fix for this problem, Veeam are currently evaluating this fix.