Search the VMware Knowledge Base (KB)
View by Article ID

Resetting Changed Block Tracking for VMware vSphere virtual machines (2139574)

  • 15 Ratings
Language Editions

Purpose

This article provides steps to reset Changed Block Tracking (CBT) for vSphere virtual machines.

Resolution

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:
  1. Open the vSphere Web Client.
  2. Right-click the virtual machine and click Power Off.
  3. 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).
  4. Right-click the virtual machine and click Edit Settings.
  5. Click the Options tab, select the General section and then click Configuration Parameters
  6. Disable CBT for the virtual machine by setting the ctkEnabled value to false.
  7. 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.

  8. 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).
  9. 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).
  10. Delete any -CTK.VMDK files within the virtual machine's working directory.
  11. In the vSphere Web Client, right-click the virtual machine and click Power On.
  12. 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:
  1. Download the 2139574_CBT-Reset.zip file attached to this article.
  2. Extract the CBT-Reset.PS1 file from the archive and save.
  3. Install and initialize VMware PowerCLI on your local system. 
  4. Open VMware PowerCLI.
  5. Change directory to where you saved the CBT-Reset.PS1 file by running the cd command:

    For example: 

    PowerCLI C:\> cd C:\CBTreset

  6. 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.

  7. 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.

  8. Run this command to load the CBT-Reset.PS1 script:

    .\CBT-Reset.PS1

    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.

  9. 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.

  10. The script prompts you to confirm execution and proceed with the CBT reset of applicable virtual machines.
  11. 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.

Additional Information

See Also

Update History

02/05/2016 - Added the PowerCLI script to reset CBT.

Language Editions

ja,2143536;zh_cn,2147379

Attachments

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.

Feedback

  • 15 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 15 Ratings
Actions
KB: