Examples of HostSystem


Examples of com.vmware.vim25.mo.HostSystem

    {
      System.out.println("No Datastore found");
      return null;
    }
   
    ConfigTarget configTarget = envBrowser.queryConfigTarget(new HostSystem(vm.getServerConnection(), hmor));
    VirtualMachineDatastoreInfo[] dis = configTarget.getDatastore();
    for (int i=0; dis!=null && i<dis.length; i++)
    {
      dsSum = dis[i].getDatastore();
      if (dsSum.isAccessible() && dsName.equals(dsSum.getName()))
View Full Code Here

Examples of com.vmware.vim25.mo.HostSystem

  throws Exception
  {
    VirtualMachineRuntimeInfo vmRuntimeInfo = vm.getRuntime();
    EnvironmentBrowser envBrowser = vm.getEnvironmentBrowser();
    ManagedObjectReference hmor = vmRuntimeInfo.getHost();
    VirtualMachineConfigOption cfgOpt = envBrowser.queryConfigOption(null, new HostSystem(vm.getServerConnection(), hmor));
    VirtualDevice[] defaultDevs = null;
    if (cfgOpt != null)
    {
      defaultDevs = cfgOpt.getDefaultDevice();
      if (defaultDevs == null)
View Full Code Here

Examples of com.vmware.vim25.mo.HostSystem

  {
    VirtualMachineRuntimeInfo vmRuntimeInfo = vm.getRuntime();
    EnvironmentBrowser envBrowser = vm.getEnvironmentBrowser();
    ManagedObjectReference hmor = vmRuntimeInfo.getHost();

    HostSystem host = new HostSystem(
        vm.getServerConnection(), hmor);
    ConfigTarget cfg = envBrowser.queryConfigTarget(host);
    VirtualMachineNetworkInfo[] nets = cfg.getNetwork();
    for (int i = 0; nets!=null && i < nets.length; i++)
    {
View Full Code Here

Examples of com.vmware.vim25.mo.HostSystem

      (powerState == VirtualMachinePowerState.suspended && vmVer < 7))
    {
      throw new InvalidPowerState();
    }
   
    HostSystem host = new HostSystem(vm.getServerConnection(), vm.getRuntime().getHost());
    ComputeResource cr = (ComputeResource) host.getParent();
    EnvironmentBrowser envBrowser = cr.getEnvironmentBrowser();
    ConfigTarget configTarget = envBrowser.queryConfigTarget(host);
    VirtualMachineConfigOption vmCfgOpt = envBrowser.queryConfigOption(null, host);

    type = validateNicType(vmCfgOpt.getGuestOSDescriptor(), vm.getConfig().getGuestId(), type);
View Full Code Here

Examples of com.vmware.vim25.mo.HostSystem

            }
            // Get instance UUID
            String instanceUuid = vmConfigInfo.getInstanceUuid();
            // Get host information
            ManagedObjectReference hmor = vmRuntimeInfo.getHost();
            HostSystem host = new HostSystem(
                vm.getServerConnection(), hmor);
            String hostName = host.getName();
            // Get Contrail VRouter virtual machine information from the host
            String vrouterIpAddress = getVirtualMachineIpAddress(dvPgName,
                    hostName, host, contrailVRouterVmNamePrefix);
            if (vrouterIpAddress == null) {
                s_logger.error("dvPg: " + dvPgName + " vm: " + vmName +
View Full Code Here

Examples of com.vmware.vim25.mo.HostSystem

    {
      System.out.println("No Datastore found");
      return null;
    }

    ConfigTarget configTarget = envBrowser.queryConfigTarget(new HostSystem(vm.getServerConnection(), hmor));
    VirtualMachineDatastoreInfo[] dis = configTarget.getDatastore();
    for (int i=0; dis!=null && i<dis.length; i++)
    {
      dsSum = dis[i].getDatastore();
      if (dsSum.isAccessible() && dsName.equals(dsSum.getName()))
View Full Code Here

Examples of com.vmware.vim25.mo.HostSystem

  throws Exception
  {
    VirtualMachineRuntimeInfo vmRuntimeInfo = vm.getRuntime();
    EnvironmentBrowser envBrowser = vm.getEnvironmentBrowser();
    ManagedObjectReference hmor = vmRuntimeInfo.getHost();
    VirtualMachineConfigOption cfgOpt = envBrowser.queryConfigOption(null, new HostSystem(vm.getServerConnection(), hmor));
    VirtualDevice[] defaultDevs = null;
    if (cfgOpt != null)
    {
      defaultDevs = cfgOpt.getDefaultDevice();
      if (defaultDevs == null)
View Full Code Here

Examples of com.vmware.vim25.mo.HostSystem

    ArrayList<String> hostList=new ArrayList<String>();
   
    for(int i=0; i<hosts.length; i++)
    {

      HostSystem host= (HostSystem) hosts[i];
      hostList.add(host.getName());

    }
   
    return hostList;
  }
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.