

That is all you need to reset CBT, Get-VM is a PowerCLI command that will get a list of VMs, that list will be passed to our Reset-CBT. PowerCLI C:\Unitrends\unitrends-scripts> Get-VM test0*|Reset-CBT PowerCLI C:\Unitrends\scripts\CBT> Get-VM test0*|Get-CBT PowerCLI C:\Unitrends\scripts\CBT> Connect-VIServer -Server vcenter01 -User root -Port password Sample usage and output PowerCLI C:\Unitrends\scripts\CBT> Set-ExecutionPolicy Bypass PowerCLI C:\Unitrends\scripts\CBT> Get-VM test01|Reset-CBT PowerCLI C:\Unitrends\scripts\CBT> Connect-VIServer -Server vcenter01 -User root -Port passwordĥ. Connect to VMware server using PowerCLI Connect-VIServer. Load Cmdlets from UnitrendsCBT.ps1 running command.

(Set-ExecutionPolicy Bypass) PowerCLI C:\Unitrends\scripts\CBT> Set-ExecutionPolicy Bypassĥ. Allow Execution of unsigned powershell script. PowerCLI C:\> cd C:\Unitrends\scripts\CBTĤ. CD to Path where you downloaded UnitrendsCBT.ps1 script.

If you use default PowerCLI console you may get error “Operation is not valid due to the current state of the object” while running CBT-Reset.ģ. Download UnitrendsCBT.ps1 script from Unitrends GitHub repo. But if you have a VM with multiple disks and any of them is not eager-zeroed-thick you will need to use Reset-CBT on that VM too.ġ. Note: VMware updated KB to say that is not necessary to reset CBT on eager-zeroed-thick disks. As explained the script needs to create/remove a temporary snapshot so it is recommended that you do not run it during production hours on VMs that may be impacted by a VM snapshot. We have created a powershell cmdlet that uses VMware PowerCLI to automate this CBT reset operation in one or multiple VMs. Resetting CBT is an ardous task that requires you to poweroff the VM and edit VM ctkEnabled property using vSphere Client or use VMware APIs to disable/enable CBT and create/remove a temporary snapshot to purge CBT tables. We already wrote about it in this post: VMware ESXi 6.0 Introduced A Changed Block Tracking Bug (2136854) – Why Recovery Testing Is Critical and recommended using ReliableDR to certify your backups.Ī VMware patch was released but after applying patch you need to reset CBT on all VMs. A few weeks ago a new CBT bug KB2136854 was discovered in ESXi 6.0.
