Examples of VirtualMachineConfigOption


Examples of com.vmware.vim25.VirtualMachineConfigOption

    public GuestOsDescriptor getGuestOsDescriptor(String guestOsId) throws Exception {
        GuestOsDescriptor guestOsDescriptor = null;
        ManagedObjectReference vmEnvironmentBrowser =
                _context.getVimClient().getMoRefProp(_mor, "environmentBrowser");
        VirtualMachineConfigOption  vmConfigOption = _context.getService().queryConfigOption(vmEnvironmentBrowser, null, null);
        List<GuestOsDescriptor> guestDescriptors = vmConfigOption.getGuestOSDescriptor();
        for (GuestOsDescriptor descriptor : guestDescriptors) {
            if (guestOsId != null && guestOsId.equalsIgnoreCase(descriptor.getId())) {
                guestOsDescriptor = descriptor;
                break;
            }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineConfigOption

        VirtualHardwareOption vhOption = getVirtualHardwareOption();
        return vhOption.getHwVersion();
    }

    public VirtualHardwareOption getVirtualHardwareOption() throws Exception {
        VirtualMachineConfigOption vmConfigOption = _context.getService().queryConfigOption(getEnvironmentBrowser(), null, null);
        return vmConfigOption.getHardwareOptions();
    }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineConfigOption

    }

    public GuestOsDescriptor getGuestOsDescriptor(String guestOsId) throws Exception {
        GuestOsDescriptor guestOsDescriptor = null;
        ManagedObjectReference vmEnvironmentBrowser = _context.getVimClient().getMoRefProp(_mor, "environmentBrowser");
        VirtualMachineConfigOption vmConfigOption = _context.getService().queryConfigOption(vmEnvironmentBrowser, null, null);
        List<GuestOsDescriptor> guestDescriptors = vmConfigOption.getGuestOSDescriptor();
        for (GuestOsDescriptor descriptor : guestDescriptors) {
            if (guestOsId != null && guestOsId.equalsIgnoreCase(descriptor.getId())) {
                guestOsDescriptor = descriptor;
                break;
            }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineConfigOption

        VirtualHardwareOption vhOption = getVirtualHardwareOption();
        return vhOption.getHwVersion();
    }

    public VirtualHardwareOption getVirtualHardwareOption() throws Exception {
        VirtualMachineConfigOption vmConfigOption = _context.getService().queryConfigOption(getEnvironmentBrowser(), null, null);
        return vmConfigOption.getHardwareOptions();
    }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineConfigOption

    public GuestOsDescriptor getGuestOsDescriptor(String guestOsId) throws Exception {
        GuestOsDescriptor guestOsDescriptor = null;
        ManagedObjectReference vmEnvironmentBrowser =
                _context.getVimClient().getMoRefProp(_mor, "environmentBrowser");
        VirtualMachineConfigOption  vmConfigOption = _context.getService().queryConfigOption(vmEnvironmentBrowser, null, null);
        List<GuestOsDescriptor> guestDescriptors = vmConfigOption.getGuestOSDescriptor();
        for (GuestOsDescriptor descriptor : guestDescriptors) {
            if (guestOsId != null && guestOsId.equalsIgnoreCase(descriptor.getId())) {
                guestOsDescriptor = descriptor;
                break;
            }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineConfigOption

        VirtualHardwareOption vhOption = getVirtualHardwareOption();
        return vhOption.getHwVersion();
    }

    public VirtualHardwareOption getVirtualHardwareOption() throws Exception {
        VirtualMachineConfigOption vmConfigOption = _context.getService().queryConfigOption(getEnvironmentBrowser(), null, null);
        return vmConfigOption.getHardwareOptions();
    }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineConfigOption

    public GuestOsDescriptor getGuestOsDescriptor(String guestOsId) throws Exception {
        GuestOsDescriptor guestOsDescriptor = null;
        ManagedObjectReference vmEnvironmentBrowser =
                _context.getVimClient().getMoRefProp(_mor, "environmentBrowser");
        VirtualMachineConfigOption  vmConfigOption = _context.getService().queryConfigOption(vmEnvironmentBrowser, null, null);
        List<GuestOsDescriptor> guestDescriptors = vmConfigOption.getGuestOSDescriptor();
        for (GuestOsDescriptor descriptor : guestDescriptors) {
            if (guestOsId != null && guestOsId.equalsIgnoreCase(descriptor.getId())) {
                guestOsDescriptor = descriptor;
                break;
            }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineConfigOption

        VirtualHardwareOption vhOption = getVirtualHardwareOption();
        return vhOption.getHwVersion();
    }

    public VirtualHardwareOption getVirtualHardwareOption() throws Exception {
        VirtualMachineConfigOption vmConfigOption = _context.getService().queryConfigOption(getEnvironmentBrowser(), null, null);
        return vmConfigOption.getHardwareOptions();
    }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineConfigOption

  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)
      {
        throw new Exception("No Datastore found in ComputeResource");
      }
    }
View Full Code Here

Examples of com.vmware.vim25.VirtualMachineConfigOption

   
    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);

    VirtualDeviceConfigSpec nicSpec = createNicSpec(type, networkName, macAddress, wakeOnLan, startConnected, configTarget);
   
    VirtualMachineConfigSpec vmConfigSpec = new VirtualMachineConfigSpec();
    vmConfigSpec.setDeviceChange(new VirtualDeviceConfigSpec []{nicSpec});
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.