Examples of CloneSpecImpl


Examples of com.vmware.vim.binding.impl.vim.vm.CloneSpecImpl

   private VcTask cloneWork(final VcDatacenter dc,
         ManagedObjectReference rpMoRef, ManagedObjectReference dsMoRef,
         ManagedObjectReference snapMoRef, final ManagedObjectReference folderMoRef,
         ManagedObjectReference hostMoRef, boolean linked, final String name,
         ConfigSpec config, final IVcTaskCallback callback) throws Exception {
      final CloneSpec spec = new CloneSpecImpl();
      RelocateSpec relocSpec = new RelocateSpecImpl();
      relocSpec.setPool(rpMoRef);
      relocSpec.setDatastore(dsMoRef);
      if (hostMoRef != null) {
         relocSpec.setHost(hostMoRef);
      }
      if (linked) {
         relocSpec.setDiskMoveType("createNewChildDiskBacking");
      }
      spec.setLocation(relocSpec);
      spec.setSnapshot(snapMoRef);
      spec.setTemplate(false);
      spec.setConfig(config);

      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         public VcTask body() throws Exception {
            VirtualMachine vm = getManagedObject();
            return new VcTask(TaskType.CloneVm,
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.