VMDK Failed to Clone (copy) – Invalid Change Tracker Error Code (7228)

VMware

When attempting to copy (clone) a VMDK, we were experiencing the issue that a copy of a VMDK would get to about 100% then fail. Performing via the Web UI or via the CLI (from a host directly) would give the same issue.

vmkfstools -i "/vmfs/volumes/datastore1/vm1/
vm1_1.vmdk" "/vmfs/volumes/datastore1/vm1-backup/vm1_1.vmdk"

Destination disk format: VMFS zeroedthick
Cloning disk '/vmfs/volumes/datastore1/vm1-backup/vm1_1.vmdk'...
Clone: 100% done.Failed to clone disk: Invalid change tracker error code (7228).

We attempted this on another VM and it worked fine, it turned out this VM was not backed up with a third-party backup software product, and that pointed to the issue CBT (change block tracking) being the issue.

Resolution

  1. Disable CBT for the virtual machine by setting the ctkEnabled value to FALSE.
  2. Disable CBT for individual virtual disks connected to the virtual machine by setting the scsix: x.ctkEnabled value for each virtual disk connected to FALSE (where scsix: x is the SCSI controller and SCSI device ID of the virtual disk).
  3. Find the datastore containing the virtual machine (right click on the datastore and then on “Browse Datastore”).
  4. Ensure no snapshot files (.delta.vmdk) present in the virtual machine folder.
  5. Delete the -CTK.VMDK files in the virtual machine folder.
  6. Boot up the machine, wait for it to start fully. Then gracefully shut it down.
  7. Now retry the clone again, it should work.

You’ll likely need to reenable the CBT again before you start backing up. And of course, the backup (and CBT) will consider this a full backup the next time it is backed up.

Additional Information

  • https://sbin-jodie.blogspot.com/2019/03/clone-vmdk-fails-on-change-tracker.html
  • https://www.iperiusbackup.net/en/how-to-reset-cbt-changed-block-tracking-on-vmware-esxi-virtual-machines/

Leave a Reply

Your email address will not be published. Required fields are marked *