Search the VMware Knowledge Base (KB)
View by Article ID
Resetting Changed Block Tracking for VMware vSphere virtual machines (2139574)
Warning: Before applying this procedure, ensure the virtual machine is not running on snapshots. For more information, see:
To reset CBT on a vSphere virtual machine:
- Open the vSphere Web Client.
- Right-click the virtual machine and click Power Off.
- Right-click the virtual machine, click the Snapshot and navigate to Snapshot Manager. Ensure there are no active snapshots. If there are snapshots present, consolidate them to commit the changes. For more information, see Consolidating snapshots in vSphere 5.x/6.0 (2003638).
- Right-click the virtual machine and click Edit Settings.
- Click the Options tab, select the General section and then click Configuration Parameters.
- Disable CBT for the virtual machine by setting the ctkEnabled value to false.
- Disable CBT for the individual virtual disks attached to the virtual machine by setting the scsix:x.ctkEnabled value for each attached virtual disk to false.
Where scsix:x is SCSI controller and SCSI device ID of your virtual disk.
- Open the virtual machine's working directory using the Datastore Browser or ESXi shell. For more information on identifying the working directory, see Locating virtual machine log files on an ESXi/ESX host (1007805).
- Ensure there are no snapshot files (.delta.vmdk) present in the virtual machine's working directory. For more information, see Determining if there are leftover delta files or snapshots that VMware vSphere or Infrastructure Client cannot detect (1005049).
- Delete any -CTK.VMDK files within the virtual machine's working directory.
- In the vSphere Web Client, right-click the virtual machine and click Power On.
- If you are using a backup application which utilizes CBT, you must re-enable CBT manually. Some backup tools automatically enable CBT, For more information, see Enabling or disabling Changed Block Tracking (CBT) on virtual machines (1031873).
Note: The first backup after resetting CBT is full. All subsequent incremental backups can reference only the change IDs generated after the full backup.
To reset CBT on multiple vSphere virtual machines using a PowerCLI script:
- Download the 2139574_CBT-Reset.zip file attached to this article.
- Extract the CBT-Reset.PS1 file from the archive and save.
- Install and initialize VMware PowerCLI on your local system.
- Open VMware PowerCLI.
- Change directory to where you saved the CBT-Reset.PS1 file by running the cd command:
PowerCLI C:\> cd C:\CBTreset
- Allow execution of an unsigned script by running this command:
PowerCLI C:\CBTreset> Set-ExecutionPolicy Bypass
Warning: This allows any unsigned script to run. Ensure you disable it after use.
- Connect to your vCenter Server using this command:
PowerCLI C:\CBTreset> Connect-VIServer -Server vcenter -User username -Password password
Where vcenter is the name of your vCenter Server, username is your vCenter Server username password
is your vCenter Server user password.
- Run this command to load the CBT-Reset.PS1 script:
Note: If you receive an error similar to File .\CBT-Reset.PS1 cannot be loaded because the execution of scripts is disabled on this system, check step 6 is applied correctly.
- The script provides a report of virtual machines that are applicable. The script lists both virtual machines where CBT can be reset and cannot be reset:
- All virtual machines where CBT can be reset are listed.
- All virtual machines where CBT cannot be reset (virtual machines that are powered off or have snapshots) are listed for notification purposes.
Note: When the script runs, a temporary virtual machine snapshot is taken. This avoids the needs for a power cycle of the virtual machine.
- The script prompts you to confirm execution and proceed with the CBT reset of applicable virtual machines.
- If you choose to continue, CBT data is reset for the virtual machines that do not have snapshots and the power state is on.
THE CONTENT OF THIS ARTICLE IS PROVIDED "AS-IS," AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, VMWARE DISCLAIMS ALL OTHER REPRESENTATIONS AND WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS CONTENT, INCLUDING THEIR FITNESS FOR A PARTICULAR PURPOSE, THEIR MERCHANTABILITY, OR THEIR NONINFRINGEMENT. VMWARE SHALL NOT BE LIABLE FOR ANY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE USE OF THIS CONTENT, INCLUDING DIRECT, INDIRECT, CONSEQUENTIAL DAMAGES, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF VMWARE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
- Determining if there are leftover delta files or snapshots that VMware vSphere or Infrastructure Client cannot detect (1005049)
Request a Product Feature
To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.