
19 Mar
2014
19 Mar
'14
10:38 a.m.
Hi, I'm trying to clone a VM from snapshot with the below code. but it is not cloning.. org.ovirt.engine.sdk.decorators.VM vm2 = api.getVMs().get("testVM"); VM cloneVM = new VM(); cloneVM.setName("MyClonedViaAPI"); VMSnapshot snap3 = new VMSnapshot(null); snap3 = vm2.getSnapshots().get(UUID.fromString("7799ce3f-a007-415a-84c5-df323e8f440d")); Action act = new Action(); act.setClone(true); act.setVm(cloneVM); snap3.restore(act); Actually, my original goal is to Clone VM directly from another VM instead of cloning from snapshot. Can you help me? -- Thanks & Regards Tejesh