Examples of VcSnapshot


Examples of com.vmware.aurora.vc.VcSnapshot

         // create a snapshot so that we can do linked clone
         vm.createSnapshot("snap1", "snap1");
         // test finding snapshots
         vm.createSnapshot("snap2", "snap2");
         VcSnapshot snap1 = vm.getSnapshotByName("snap1");
         AuAssert.check(snap1 != null);
         VcSnapshot snap2 = vm.getSnapshotByName("snap2");
         AuAssert.check(snap2 != null);
         System.out.println("snap1: " + snap1 + " snap2: " + snap2);

         System.out.println("Mark the VM as template");
         vm.markAsTemplate();
View Full Code Here

Examples of com.vmware.aurora.vc.VcSnapshot

   public Void call() throws Exception {
      final VcVirtualMachine vm = VcCache.get(vmId);
      VcContext.inVcSessionDo(new VcSession<Void>() {
         @Override
         protected Void body() throws Exception {
            VcSnapshot snap = vm.createSnapshot(name, description);
            snapId = snap.getId();
            return null;
         }
         protected boolean isTaskSession() {
            return true;
         }
View Full Code Here

Examples of com.vmware.aurora.vc.VcSnapshot

            return true;
         }

         @Override
         protected Boolean body() throws Exception {
            VcSnapshot snapshot =
                  templateVM.getSnapshotByName(Constants.ROOT_SNAPSTHOT_NAME);
            if (snapshot != null) {
               snapshot.remove();
            }
            return true;
         }
      });
   }
View Full Code Here

Examples of com.vmware.aurora.vc.VcSnapshot

   private HashMap<String, Disk.Operation> createVm() throws Exception {
      // Find the template and template snapshot to clone from
      final VcVirtualMachine template =
            VcCache.get(vmSchema.diskSchema.getParent());
      VcSnapshot snap =
            template.getSnapshotByName(vmSchema.diskSchema.getParentSnap());
      if (snap == null) {
         // this is a blocking call
         snap = template.createSnapshot(vmSchema.diskSchema.getParentSnap(),
               "Serengeti template Root Snapshot");
View Full Code Here

Examples of com.vmware.aurora.vc.VcSnapshot

            }

            @Override
            protected Void body() throws Exception {
               VcVirtualMachine template = VcCache.get(srcVmId);
               VcSnapshot snap = template.getSnapshotByName(snapName);

               CreateSpec vmSpec =
                     new CreateSpec(newVmName, snap, targetRp, targetDs, true, null);

               DeviceId[] removeSet = removeDisks;
View Full Code Here

Examples of com.vmware.aurora.vc.VcSnapshot

            }

            @Override
            protected Void body() throws Exception {
               VcVirtualMachine vm = VcCache.get(vmId);
               VcSnapshot snap = vm.getSnapshotByName(snapName);
               snap.remove();
               return null;
            }
         });
         return null;
      }
View Full Code Here

Examples of com.vmware.aurora.vc.VcSnapshot

         @Override
         protected Void body() throws Exception {
            final VcVirtualMachine template =
                  VcCache.get(vmSchema.diskSchema.getParent());
            VcSnapshot snap =
                  template.getSnapshotByName(vmSchema.diskSchema
                        .getParentSnap());
            if (snap == null) {
               // this is a blocking call
               snap =
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.