Examples of waitForMe()


Examples of com.vmware.vim25.mo.Task.waitForMe()

   
    Task task = vm.migrateVM_Task(cr.getResourcePool(), newHost,
        VirtualMachineMovePriority.highPriority,
        VirtualMachinePowerState.poweredOn);
 
    if(task.waitForMe()==Task.SUCCESS)
    {
      System.out.println("VMotioned!");
    }
    else
    {
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

    {
      System.out.println("Incorrect option for " + vmname);
    }

    Task task = vm.reconfigVM_Task(vmConfigSpec);
    task.waitForMe();
  }

  static ResourceAllocationInfo getShares(String val) throws Exception
  {
    ResourceAllocationInfo raInfo = new ResourceAllocationInfo();
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

      System.out.println("Invlaid device type [disk|cd]");
      return;
    }
   
    Task task = vm.reconfigVM_Task(vmConfigSpec);
    task.waitForMe();
  }

  static VirtualDeviceConfigSpec createAddCdConfigSpec(VirtualMachine vm, String dsName, String isoName) throws Exception
  {
    VirtualDeviceConfigSpec cdSpec = new VirtualDeviceConfigSpec();
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

    if(nicSpec!=null)
    {
      vmConfigSpec.setDeviceChange(
          new VirtualDeviceConfigSpec []{nicSpec});
      Task task = vm.reconfigVM_Task(vmConfigSpec);
      result = task.waitForMe();
    }

    if(result==Task.SUCCESS)
    {
      System.out.println("Done with NIC for VM:" + vmname);
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

      System.out.println(vmname + " guest OS rebooted");
    }
    else if("poweron".equalsIgnoreCase(op))
    {
      Task task = vm.powerOnVM_Task(null);
      if(task.waitForMe()==Task.SUCCESS)
      {
        System.out.println(vmname + " powered on");
      }
    }
    else if("poweroff".equalsIgnoreCase(op))
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

      }
    }
    else if("poweroff".equalsIgnoreCase(op))
    {
      Task task = vm.powerOffVM_Task();
      if(task.waitForMe()==Task.SUCCESS)
      {
        System.out.println(vmname + " powered off");
      }
    }
    else if("reset".equalsIgnoreCase(op))
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

      }
    }
    else if("reset".equalsIgnoreCase(op))
    {
      Task task = vm.resetVM_Task();
      if(task.waitForMe()==Task.SUCCESS)
      {
        System.out.println(vmname + " reset");
      }
    }
    else if("standby".equalsIgnoreCase(op))
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

      System.out.println(vmname + " guest OS stoodby");
    }
    else if("suspend".equalsIgnoreCase(op))
    {
      Task task = vm.suspendVM_Task();
      if(task.waitForMe()==Task.SUCCESS)
      {
        System.out.println(vmname + " suspended");
      }
    }
    else if("shutdown".equalsIgnoreCase(op))
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

      }
    }
    else if("shutdown".equalsIgnoreCase(op))
    {
      Task task = vm.suspendVM_Task();
      if(task.waitForMe()==Task.SUCCESS)
      {
        System.out.println(vmname + " suspended");
      }
    }
    else
View Full Code Here

Examples of com.vmware.vim25.mo.Task.waitForMe()

      System.out.println("Invlaid device type [disk|cd]");
      return;
    }
   
    Task task = vm.reconfigVM_Task(vmConfigSpec);
    task.waitForMe();
  }

  private static VirtualDevice findVirtualDevice(
      VirtualMachineConfigInfo vmConfig, String name)
  {
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.