/** @since SDK4.0 */ public VirtualApp createVApp(String name, ResourceConfigSpec resSpec, VAppConfigSpec configSpec, Folder vmFolder) throws InvalidName, DuplicateName, InsufficientResourcesFault, InvalidState, VmConfigFault, RuntimeFault, RemoteException { ManagedObjectReference vaMor = getVimService().createVApp(getMOR(), name, resSpec, configSpec, vmFolder==null? null : vmFolder.getMOR()); return new VirtualApp(getServerConnection(), vaMor); }
public ResourcePool createResourcePool(String name, ResourceConfigSpec spec) throws InvalidName, DuplicateName, InsufficientResourcesFault, RuntimeFault, RemoteException { ManagedObjectReference rpMor = getVimService().createResourcePool(getMOR(), name, spec); return new ResourcePool(getServerConnection(), rpMor); }
public ResourcePoolRuntimeInfo getRuntime() { return (ResourcePoolRuntimeInfo) this.getCurrentProperty("runtime"); }
public void updateConfig(String name, ResourceConfigSpec spec) throws InvalidName, DuplicateName, ConcurrentAccess, InsufficientResourcesFault, RuntimeFault, RemoteException { getVimService().updateConfig(getMOR(), name, spec); } }
public ClusterHostRecommendation[] recommendHostsForVm(VirtualMachine vm, ResourcePool pool) throws RuntimeFault, RemoteException { if(vm==null) { throw new IllegalArgumentException("vm must not be null."); } return getVimService().recommendHostsForVm(getMOR(), vm.getMOR(), pool==null? null : pool.getMOR()); }
public static void main(String[] args) throws Exception { ServiceInstance si = SampleUtil.createServiceInstance(); Folder rootFolder = si.getRootFolder(); Datacenter dc = (Datacenter) new InventoryNavigator(rootFolder).searchManagedEntities("Datacenter")[0]; ManagedEntity[] entities = new InventoryNavigator(dc).searchManagedEntities("ResourcePool"); System.out.println("============ Resource Pools ============"); for (ManagedEntity entity : entities) { ResourcePool rp = (ResourcePool) entity; System.out.println("Name: " + rp.getName()); System.out.println("-- Moid: " + rp.getMOR().getVal()); ResourcePoolSummary sum = rp.getSummary(); ResourceAllocationInfo info; info = sum.getConfig().getCpuAllocation(); System.out.println("-- CPU reservation: " + info.getReservation()); System.out.println("-- CPU limit: " + info.getLimit()); info = sum.getConfig().getMemoryAllocation(); System.out.println("-- Mem reservation: " + info.getReservation()); System.out.println("-- Mem limit: " + info.getLimit()); } }
httpNfcLease = rp.importVApp(ovfImportResult.getImportSpec(), vmFolder, host);
public ComputeResource getOwner() throws InvalidProperty, RuntimeFault, RemoteException { return (ComputeResource) this.getManagedObject("owner"); }
public ResourcePool[] getResourcePools() throws InvalidProperty, RuntimeFault, RemoteException { return getResourcePools("resourcePool"); }
public void markAsVirtualMachine(ResourcePool pool, HostSystem host) throws VmConfigFault, FileFault, InvalidState, InvalidDatastore, RuntimeFault, RemoteException { if(pool==null) { throw new IllegalArgumentException("pool must not be null."); } getVimService().markAsVirtualMachine(getMOR(), pool.getMOR(), host==null? null : host.getMOR()); }
/** @since SDK4.1 */ public ResourceConfigOption queryResourceConfigOption() throws RuntimeFault, RemoteException { return getVimService().queryResourceConfigOption(getMOR()); }
httpNfcLease = rp.importVApp(ovfImportResult.getImportSpec(), vmFolder, host);
public Event[] validateMigration(VirtualMachine[] vms, VirtualMachinePowerState state, String[] testType , ResourcePool pool, HostSystem host) throws InvalidState, RuntimeFault, RemoteException { if(vms==null) { throw new IllegalArgumentException("vms must not be null."); } return getVimService().validateMigration(getMOR(), MorUtil.createMORs(vms), state, testType, pool==null? null: pool.getMOR(), host==null? null : host.getMOR()); }
/** @since SDK4.0 */ public Task createChildVM_Task(VirtualMachineConfigSpec config, HostSystem host) throws VmConfigFault, FileFault, OutOfBounds, InvalidName, InvalidDatastore, InsufficientResourcesFault, RuntimeFault, RemoteException { ManagedObjectReference taskMor = getVimService().createChildVM_Task(getMOR(), config, host==null? null : host.getMOR()); return new Task(getServerConnection(), taskMor); }
/** @since SDK4.1 */ public void refreshRuntime() throws RuntimeFault, RemoteException { getVimService().refreshRuntime(getMOR()); }
public ResourceConfigSpec getConfig() { return (ResourceConfigSpec) this.getCurrentProperty("config"); }
public OvfCreateImportSpecResult createImportSpec(String ovfDescriptor, ResourcePool resourcePool, Datastore datastore, OvfCreateImportSpecParams cisp) throws TaskInProgress, VmConfigFault, ConcurrentAccess, FileFault, InvalidState, InvalidDatastore, RuntimeFault, RemoteException { return getVimService().createImportSpec(getMOR(), ovfDescriptor, resourcePool.getMOR(), datastore.getMOR(), cisp); }
/** @since SDK4.0 */ public Task registerChildVM_Task(String path, String name, HostSystem host) throws OutOfBounds, AlreadyExists, InvalidDatastore, NotFound, InvalidName, VmConfigFault, InsufficientResourcesFault, FileFault, RuntimeFault, RemoteException { ManagedObjectReference mor = getVimService().registerChildVM_Task(getMOR(), path, name, host==null?null:host.getMOR()); return new Task(getServerConnection(), mor); }
public void destroyChildren() throws RuntimeFault, RemoteException { getVimService().destroyChildren(getMOR()); }
public ResourceConfigSpec[] getChildConfiguration() { return (ResourceConfigSpec[]) this.getCurrentProperty("childConfiguration"); }