When users revert to a snapshot, it will automatically disable and enable CBT. If the snapshot is not a memory snapshot, enabling CBT will fail and CBT is disabled after reverting.
To resolve this issue, re-enable CBT and perform a full backup.
Note: Ensure that there are no snapshots on the virtual machine before enabling change tracking. If you create snapshots before enabling CBT, the QueryChangedDiskAreas API might not return any error or the data returned by QueryChangedDiskAreas might be incorrect.
Product version Impact
The issue can occurs in all vSphere versions.
How to detect a snapshot revert operation
See the sample code below for an example of how to query tasks from VM task history is provided in the attachment. It shows how to find tasks of type “RevertToSnapshot_Task” ever happened on a VM “RHELXfsTargetClone_src” in the last 7 days. The VixDiskLib_QueryAllocatedBlocks is available since VDDK 6.7 and later.
-------------------------------------------------------------------- /** * This class is to demonstrate querying tasks from VM task history. */ public class TaskQuery { /** * find task of specific type in VM task history */ public List<TaskInfo> query(ManagedObjectReference vmRef, Date sinceDate, String taskType) throws Exception { ServiceContent mSC = …; VimPortType vimPort = …; ManagedObjectReference taskManagerRef = mSC.getTaskManager(); //prepare task filter. specify the vmRef as target TaskFilterSpecByEntity entityFilter = new TaskFilterSpecByEntity(); entityFilter.setEntity(vmRef); entityFilter.setRecursion(TaskFilterSpecRecursionOption.SELF); //specify startTime TaskFilterSpecByTime startTimeFilter = new TaskFilterSpecByTime(); Calendar startTime = Calendar.getInstance(); startTime.setTime(sinceDate); startTimeFilter.setBeginTime(startTime); startTimeFilter.setTimeType(TaskFilterSpecTimeOption.STARTED_TIME); TaskFilterSpec taskFilter = new TaskFilterSpec(); taskFilter.setEntity(entityFilter); taskFilter.setTime(startTimeFilter); //do query ManagedObjectReference taskCollectorRef = vimPort.createCollectorForTasks(taskManagerRef, taskFilter); List<TaskInfo> taskList = new LinkedList<TaskInfo>(); List<TaskInfo> pageInfo = vimPort.readNextTasks(taskCollectorRef, 100); while (pageInfo != null && pageInfo.size() != 0) { taskList.addAll(pageInfo); pageInfo = vimPort.readNextTasks(taskCollectorRef, 100); } List<TaskInfo> retList = new ArrayList<>(); for (TaskInfo task : taskList) { if (task.getName().equals(taskType)) { retList.add(task); } } return retList; } public static void main(String[] args) throws Exception { TaskQuery taskQuery = new TaskQuery(context); Date oneWeekAgo = new Date(System.currentTimeMillis() - 7 * 24 * 3600 * 1000); ManagedObjectReference vmRef = …; List<TaskInfo> taskList = taskQuery.query(vmRef, oneWeekAgo, "RevertToSnapshot_Task"); if (taskList.size() > 0) { System.out.println("RevertSnapshot tasks have been triggered on the vm."); } } } --------------------------------------------------------------------