Guest OS:SUSE11 64
I'm using vsphere API to revert to a snapshot
the error msg is : Unable to access file since it is loced
the error stack is : An error occured while reverting to a snapshot:msg.snapshot.error-DUPLICATEDISK
but success to revert snapshot manually on vcenter client.
Mostly it happens, when the guest's disks are not released by backup appliance (eg: Veeam). So have a look at the "Edit Settings" of your backup appliance. If it is attached, then remove (don't delete) it. Also would recommend you to make sure the CIDs are perfect in snapshot chain. For more: VMware KB: Resolving the CID mismatch error: The parent virtual disk has been modified since the child was created