Hi ,
I'm having an issue with deleting the snapshots in Esxi server 4.1.While calling removeSnapshot_Task it throws exception as "InvalidRequest", but the same code working fine if the Esxi Server(4.1) is connected to VCenter ,And also the same code is working fine with ESXi 5.x
VirtualMachineSnapshot snapObj = getSnapshotInTree(vm,snapName[i]);
Task taskMor = snapObj.removeSnapshot_Task(false, true); // exception is thrown here
===================
com.vmware.vim25.InvalidRequest
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at com.vmware.vim25.ws.XmlGen.fromXml(XmlGen.java:205)
at com.vmware.vim25.ws.XmlGen.parseSoapFault(XmlGen.java:82)
at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:134)
at com.vmware.vim25.ws.VimStub.removeSnapshot_Task(VimStub.java:3636)
at com.vmware.vim25.mo.VirtualMachineSnapshot.removeSnapshot_Task(Virtua
lMachineSnapshot.java:76)
at com.vsphere.newimp.Snapshot.deleteSnapshot(Snapshot.java:139)
at com.vsphere.newimp.VmwareApi.doStunUnstunCycleForVM(VmwareApi.java:435)
at com.vsphere.newimp.Vmwarenewimp.performVDAPoperations(Vmwarenewimp.java:256)
=================
How to handle this issue,