Examples of VirtualMachineRuntimeInfo


Examples of com.vmware.vim25.VirtualMachineRuntimeInfo

            public void run() {
                s_logger.info("VM Question monitor started...");

                while (!flags[0]) {
                    try {
                        VirtualMachineRuntimeInfo runtimeInfo = vmMo.getRuntimeInfo();
                        VirtualMachineQuestionInfo question = runtimeInfo.getQuestion();
                        if (question != null) {
                            s_logger.info("Question id: " + question.getId());
                            s_logger.info("Question text: " + question.getText());
                            if (question.getMessage() != null) {
                                for (VirtualMachineMessage msg : question.getMessage()) {
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineRuntimeInfo

            public void run() {
                s_logger.info("VM Question monitor started...");

                while (!flags[0]) {
                    try {
                        VirtualMachineRuntimeInfo runtimeInfo = vmMo.getRuntimeInfo();
                        VirtualMachineQuestionInfo question = runtimeInfo.getQuestion();
                        if (question != null) {
                            if (s_logger.isTraceEnabled()) {
                                s_logger.trace("Question id: " + question.getId());
                                s_logger.trace("Question text: " + question.getText());
                            }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineRuntimeInfo

    }

    public void exportVm(String exportDir, String exportName, boolean packToOva, boolean leaveOvaFileOnly) throws Exception {
        ManagedObjectReference morOvf = _context.getServiceContent().getOvfManager();

        VirtualMachineRuntimeInfo runtimeInfo = getRuntimeInfo();
        HostMO hostMo = new HostMO(_context, runtimeInfo.getHost());
        String hostName = hostMo.getHostName();
        String vmName = getVmName();

        DatacenterMO dcMo = new DatacenterMO(_context, hostMo.getHyperHostDatacenter());

        if (runtimeInfo.getPowerState() != VirtualMachinePowerState.POWERED_OFF) {
            String msg = "Unable to export VM because it is not at powerdOff state. vmName: " + vmName + ", host: " + hostName;
            s_logger.error(msg);
            throw new Exception(msg);
        }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineRuntimeInfo

            public void run() {
                s_logger.info("VM Question monitor started...");

                while (!flags[0]) {
                    try {
                        VirtualMachineRuntimeInfo runtimeInfo = vmMo.getRuntimeInfo();
                        VirtualMachineQuestionInfo question = runtimeInfo.getQuestion();
                        if (question != null) {
                            encounterQuestion[0] = true;
                            if (s_logger.isTraceEnabled()) {
                                s_logger.trace("Question id: " + question.getId());
                                s_logger.trace("Question text: " + question.getText());
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineRuntimeInfo

    return null;
  }

  public HostMO getRunningHost() throws Exception {
    VirtualMachineRuntimeInfo runtimeInfo = getRuntimeInfo();
    return new HostMO(_context, runtimeInfo.getHost());
  }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineRuntimeInfo

            public void run() {
                s_logger.info("VM Question monitor started...");

                while(!flags[0]) {
                    try {
                        VirtualMachineRuntimeInfo runtimeInfo = vmMo.getRuntimeInfo();
                        VirtualMachineQuestionInfo question = runtimeInfo.getQuestion();
                        if(question != null) {
                            if(s_logger.isTraceEnabled()) {
                                s_logger.trace("Question id: " + question.getId());
                                s_logger.trace("Question text: " + question.getText());
                            }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineRuntimeInfo

  }

  public void exportVm(String exportDir, String exportName, boolean packToOva, boolean leaveOvaFileOnly) throws Exception {
    ManagedObjectReference morOvf = _context.getServiceContent().getOvfManager();

    VirtualMachineRuntimeInfo runtimeInfo = getRuntimeInfo();
    HostMO hostMo = new HostMO(_context, runtimeInfo.getHost());
    String hostName = hostMo.getHostName();
    String vmName = getVmName();

    DatacenterMO dcMo = new DatacenterMO(_context, hostMo.getHyperHostDatacenter());

    if(runtimeInfo.getPowerState() != VirtualMachinePowerState.POWERED_OFF) {
      String msg = "Unable to export VM because it is not at powerdOff state. vmName: " + vmName + ", host: " + hostName;
      s_logger.error(msg);
      throw new Exception(msg);
    }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineRuntimeInfo

            public void run() {
                s_logger.info("VM Question monitor started...");

                while (!flags[0]) {
                    try {
                        VirtualMachineRuntimeInfo runtimeInfo = vmMo.getRuntimeInfo();
                        VirtualMachineQuestionInfo question = runtimeInfo.getQuestion();
                        if (question != null) {
                            if (s_logger.isTraceEnabled()) {
                                s_logger.trace("Question id: " + question.getId());
                                s_logger.trace("Question text: " + question.getText());
                            }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineRuntimeInfo

    private static State convertState(VirtualMachinePowerState powerState) {
        return s_statesTable.get(powerState);
    }

    private static State getVmState(VirtualMachineMO vmMo) throws Exception {
        VirtualMachineRuntimeInfo runtimeInfo = vmMo.getRuntimeInfo();
        return convertState(runtimeInfo.getPowerState());
    }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineRuntimeInfo

   
    return null;
  }
 
  public HostMO getRunningHost() throws Exception {
    VirtualMachineRuntimeInfo runtimeInfo = getRuntimeInfo();
    return new HostMO(_context, runtimeInfo.getHost());
  }
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.