There is a VMware KB article available that describes the necessary steps very well. But sometimes a picture is worth a thousand words – so here a detailed description with some screenshots. The advantage of this script is, that there is no need for a downtime of the affected virtual machines.
How to reset CBT for multiple VMs running on the same ESXi host:
- download the PowerCLI script (down below, section “Attachments”)
- if not already done – install PowerCLI (Back to Basics: Part 1 Installing PowerCLI)
- open PowerCLI and allow execution of an unsigned script:
Command: Set-ExecutionPolicy Bypass
- start the downloaded script:
you can now cancel the script pressing “control” + “c” or you specify the FQDN (or IP address) of the host whose VMs you want to reset CBT.
- a window opens where you can specify the root credentials to the ESXi host:
The script will now list all VMs where CBT can be reset and those, where a CBT reset is not possible. There are two reasons why a CBT reset is not possible: the VM is powered off or an open snapshot exists.
You can now cancel the script pressing “control” + “c” or you press any key to start the CBT reset of the applicable VMs. Depending on the number of VMs the script will run some minutes – do not cancel it once it is executed.
Please note, that the first backup after resetting CBT will be a Full Backup. This backup will take a longer time to finish and of course it is necessary to backup more data than performing an incremental backup!