if (isLinkedClone)
options.add(CloneOptions.Link);
ISnapshot currentSnapshot = new TakeSnapshotIfNotAlreadyAttached(manager,
"snapshotName", "snapshotDesc", logger).apply(master);
IProgress progress = currentSnapshot.getMachine().cloneTo(clonedMachine,
CloneMode.MachineState, options);
progress.waitForCompletion(-1);
// memory may not be the same as the master vm
clonedMachine.setMemorySize(cloneSpec.getVmSpec().getMemory());
// registering