VMware {code} Community
jjjjjjjjjjk
Contributor
Contributor

how to call ExportSnapshot? An error in calling ExportSnapshot

In the ReferenceGuide, there is a function: ExportSnapshot, which describes that: Obtains an export lease on this snapshot. The export lease contains a list of URLs for the virtual disks for this snapshot, as well as a ticket giving access to the URLs. and the Parameters: ManagedObjectReference,A reference to the VirtualMachineSnapshot used to make the method call. But when I tried to call the function, an unexpected error occurred: System.ServiceModel.FaultException In mscorlib.dll ,The operation is not supported on the object. I'm sure that the ManagedObjectReference of the snapshot is correct, because I can call ReverttoSnapshot_Task whit this ManagedObjectReference . And also can call ExportVm to get the ManagedObjectReference of HttpNfcLease with the vmmachile ManagedObjectReference . So how to call ExportSnapshot without error? Is there any bug in this function? Or the required parameter description is wrong? VS2015, C# SDK:6.5.0 ESXI:5.5,6.7,7.0 The test code: ManagedObjectReference httpNfcLease = null; ManagedObjectReference snapmor = getSnapshotReference(vmmor, snapshotname); //ok cb._connection._service.RevertToSnapshot_Task(snapmor, null, false); //ok httpNfcLease = cb._connection._service.ExportVm(vmmor); //ok httpNfcLease = cb._connection._service.ExportSnapshot(snapmor); //error
0 Kudos
0 Replies