Reverting a VM snapshot never completes causing the VM to be in a Partially Powered off status
book
Article ID: 377705
calendar_today
Updated On:
Products
VMware Cloud Director
Issue/Introduction
"Revert snapshot" option does not work which cause the task to run "endless".
Taking a snapshot on a powered off VM and then attempting to revert the VM with the snapshot will never completes and causing the VM to stay in a powered off state
From the debug logs, it is reported the error "com.vmware.ssdc.library.exceptions.VimInvalidStateException: The operation could not be performed because the object is in an invalid state. vCenter Server task (moref: task-XXX) failed in vCenter Server '<vcenter_fqdn' (XXX-XXX-XXX-XXXX-XXXXXXXXXXXX). at com.vmware.ssdc.library.vim.LmVim.Convert(LmVim.java:362) at com.vmware.ssdc.library.vim.LmVim.Convert(LmVim.java:500) at com.vmware.vcloud.val.taskmanagement.TaskWaiterInvRecord.CheckForError(TaskWaiterInvRecord.java:176) at com.vmware.vcloud.val.internal.impl.VcVimHandle.waitForTask(VcVimHandle.java:144) at com.vmware.vcloud.val.internal.impl.ReconfigureVmActivity$ReconfigureVmInVcPhase.reconfigureVm(ReconfigureVmActivity.java:340) at com.vmware.vcloud.val.internal.impl.ReconfigureVmActivity$ReconfigureVmInVcPhase.invoke(ReconfigureVmActivity.java:256) at com.vmware.vcloud.activity.executors.ActivityRunner.runPhase(ActivityRunner.java:175) at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:112) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: (vim.fault.InvalidPowerState) { faultCause = null, faultMessage = null, requestedState = poweredOff, existingState = poweredOn }"
The snapshot are placed on VSAN datastore
Environment
VMware Cloud Director 10.5.1
Cause
If a vm with a snapshot placed on VSAN datastore, and try to revert the snapshot, new delta file is being created with the same name as the old one. This scenario is not handled in the VmDiskPredicate.
This also cause an issue that the revert snapshot task is not timing out in Cloud Director because timeout handling is not implemented in 10.5 releases.
Resolution
This issue will be fixed in future release of Cloud Director.