Package com.vmware.vim25.mo

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


  public void powerOnVm(VirtualMachine newVm) throws VmConfigFault, TaskInProgress, FileFault, InvalidState, InsufficientResourcesFault, RuntimeFault, RemoteException, InterruptedException {
    String vmName=newVm.getName();

    Task powerOnTask=newVm.powerOnVM_Task(null);
    powerOnTask.waitForTask();
    System.out.println("vm"+vmName+" is powered on");

  }

View Full Code Here


    VirtualMachineConfigSpec vmConfigSpec2 = new VirtualMachineConfigSpec();
    vmConfigSpec2.setExtraConfig(extraConfig);

    Task vnctask =   newVm.reconfigVM_Task(vmConfigSpec2);
    String vncresult=    vnctask.waitForTask();

    if(vncresult == Task.SUCCESS)
    {
      System.out.println("VNC deactivated Sucessfully");
View Full Code Here

    VirtualMachineConfigSpec vmConfigSpec2 = new VirtualMachineConfigSpec();
    vmConfigSpec2.setExtraConfig(extraConfig);
 

    Task vnctask =   newVm.reconfigVM_Task(vmConfigSpec2);
    String vncresult=    vnctask.waitForTask();

    if(vncresult == Task.SUCCESS)
    {
      System.out.println("VNC Set Sucessfully");
View Full Code Here

   
    vmConfigSpec.setExtraConfig(optionConfig);


    Task pxetask =   vm.reconfigVM_Task(vmConfigSpec);
    String pxeresult=    pxetask.waitForTask();

    if(pxeresult == Task.SUCCESS)
    {
      System.out.println("Pxe Set Sucessfully");
View Full Code Here

    VirtualMachineConfigSpec vmConfigSpec = new VirtualMachineConfigSpec();
    vmConfigSpec.setExtraConfig(bootOptionsConfig);

    Task bootOptionstask =   vm.reconfigVM_Task(vmConfigSpec);
    String bootOptionsResult=    bootOptionstask.waitForTask();

    if(bootOptionsResult == Task.SUCCESS)
    {
      System.out.println("Boot order Set Sucessfully");
View Full Code Here

    vmSpec.setFiles(vmfi);

    // call the createVM_Task method on the vm folder
    // TOO: null, host ?
    Task task = vmFolder.createVM_Task(vmSpec, rp, null);
    String result= task.waitForTask();
    //    String result = task.waitForMe();  


    VirtualMachine newVm=null;
View Full Code Here

      vmConfigSpec.setDeviceChange(new VirtualDeviceConfigSpec[]{cdSpec});

      System.err.println("Mounting cdrom"+vsphereDataStoreName+vmCdromIsoPath);
      Task cdtask = newVm.reconfigVM_Task(vmConfigSpec);
      String cdresult=cdtask.waitForTask();

      if(cdresult == Task.SUCCESS)
      {
        System.out.println("Cdrom Created Sucessfully");
View Full Code Here

    bootoptions.setEnterBIOSSetup(flag);

    vmConfigSpec.setBootOptions(bootoptions);

    Task biostask = newVm.reconfigVM_Task(vmConfigSpec);
    String biosresult=biostask.waitForTask();

    if(biosresult == Task.SUCCESS)
    {
      System.out.println("Enter Bios Set set to "+flag);
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.