Error "Snapshot snapshot-##### does not exist for Virtual Machine vm-#####" when reverting a newly copied vApp to a snapshot or when deleting the snapshot
search cancel

Error "Snapshot snapshot-##### does not exist for Virtual Machine vm-#####" when reverting a newly copied vApp to a snapshot or when deleting the snapshot

book

Article ID: 379262

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • After taking a copy of a powered on vApp and taking a snapshot of the newly copied vApp, when traying to revert the vApp to the snapshot or deleting the snapshot taken you see the error;

    Snapshot snapshot-##### does not exist for Virtual Machine vm-#####
  • The issue only occurs when taking a copy of a running vApp.

  • The issue does not occur when the copy has been taken from a powered off vApp.

  • In vCenter the snapshot creation task is completed and we can also see the snapshot on the VM.

  • In vCenter there is no task related to the revert/delete snapshot tasks initiated in VMware Cloud Director (VCD).

  • In /opt/vmware/vcloud-director/logs/vcloud-container-debug.log you see entry similar the one reported below:


    2024-09-11 11:22:07,621 | ERROR    | storage-fabric-activity-pool-153 | RevertToVmSnapshotActivity     | [Activity Execution] Uncaught Exception during Activity execution. Recent phase: com.vmw
    are.vcloud.fabric.storage.storedVm.impl.RevertToVmSnapshotActivity$RevertToCurrentSnapshotPhase@2ef0c74b - Handle: urn:uuid:########-###-####-#######3032, Current Phase: RevertToVmSnapsh
    otActivity$RevertToCurrentSnapshotPhase | requestId=########-###-####-#######09d6,request=POST https://vcloud.example.com/api/vApp/vm-########-###-####-#######f37ef/acti
    on/revertToCurrentSnapshot,requestTime=1726053725437,remoteAddress=##.##.##.##:54747,userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...,accept=application/*+xml;version40.0.0-alphavcd=########-###-####-#######dec0,task=########-###-####-#######e264 activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:########-###-####-#######e264) activity=(com.vmware.ssdc.backend.RevertVAppSnapshotActivity,urn:uuid:########-###-####-#######6250) activity=(com.vmware.vcloud.fabric.storage.storedVm.impl.Reve
    rtToVmSnapshotActivity,urn:uuid:########-###-####-#######3032)
    java.util.concurrent.ExecutionException: com.vmware.ssdc.library.exceptions.InvalidSnapshotException: Snapshot snapshot-32060 does not exist for Virtual Machine vm-32059
            at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:136)
            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: com.vmware.ssdc.library.exceptions.InvalidSnapshotException: Snapshot snapshot-32060 does not exist for Virtual Machine vm-#####
            at com.vmware.vcloud.val.internal.impl.VC20VirtualServer.revertSnapshot(VC20VirtualServer.java:832)
            at com.vmware.vcloud.fabric.storage.storedVm.impl.StoredVmUtils.revertUserCreatedSnapshot(StoredVmUtils.java:365)
            at com.vmware.vcloud.fabric.storage.storedVm.impl.RevertToVmSnapshotActivity$RevertToCurrentSnapshotPhase.invokeCancelableOperation(RevertToVmSnapshotActivity.java:194)
            at com.vmware.vcloud.common.activity.toolkit.VcdAbstractActivity$CancelablePhase.invoke(VcdAbstractActivity.java:591)
            at com.vmware.vcloud.activity.executors.ActivityRunner.runPhase(ActivityRunner.java:175)
            at com.vmware.vcloud.activity.executors.ActivityRunner.run(ActivityRunner.java:112)
            ... 5 more

Environment

VMware Cloud Director 10.6

Cause

When doing the copy operation, VCD takes a snapshot of the source VM, Then copies the VM to target.
The issue is related to the target VM is still pointing to source VM UUID and when the snapshot is created on target VM, the snapshot might be having the old UUID (which seems incorrect).
Hence when doing the snapshot revert operation, the mismatch happens which leads to the error.

Resolution

This is a known issue affecting VMware Cloud Director 10.6.

Currently there is no resolution.

Workaround

Power on the copied vApp before taking the snapshot.