{ new DiskCreateSpec(slot3, ds, "data",
DiskMode.persistent, DiskSize.sizeFromGB(20)) };
//Import vm -- "PlatformTestVM" as the target test vm.
ImportVmSP sp0 = new TestUtil().testImportVM(vmName, rp);
//Take a snapshot for test vm -- snap0
final String snapshotName = "snap";
TakeSnapshotSP sp1 =
new TestUtil().testTakeSnapshot(sp0.getResult().getId(), snapshotName, "snapshot of PlatformTestVM");
//Clone from imported vm's snapshot -- "snap0".
String newVmName1 = "clonedVM1";
CloneVmSP sp2 =
new TestUtil().testCloneVm(newVmName1, sp0.getResult().getId(),
snapshotName, rp, ds, removeDisks, addDisks);
logger.info("Cloned VM: " + sp2.getResult());
//Clone from "clonedVM1",first take a snapshot,then clone.
String newVmName2 = "clonedVM2";
CloneVmSP sp3 =
new TestUtil().testCloneVm(newVmName2, sp0.getResult().getId(),
snapshotName, rp, ds, removeDisks, addDisks1);
logger.info("Cloned VM: " + sp3.getResult());
//Take a snapshot for "clonedVM1" -- snap1
TakeSnapshotSP sp4 =