public Task moveIntoFolder_Task(ManagedEntity[] entities) throws DuplicateName, InvalidState, InvalidFolder, RuntimeFault, RemoteException { if(entities==null) { throw new IllegalArgumentException("entities must not be null"); } return new Task( getServerConnection(), getVimService().moveIntoFolder_Task(getMOR(), MorUtil.createMORs(entities)) ); }
public Task cloneVM_Task(Folder folder, String name, VirtualMachineCloneSpec spec) throws VmConfigFault, TaskInProgress, CustomizationFault, FileFault, InvalidState, InsufficientResourcesFault, MigrationFault, InvalidDatastore, RuntimeFault, RemoteException { if(folder==null) { throw new IllegalArgumentException("folder must not be null."); } ManagedObjectReference mor = getVimService().cloneVM_Task(getMOR(), folder.getMOR(), name, spec); return new Task(getServerConnection(), mor); }
public Datacenter createDatacenter(String name) throws InvalidName, DuplicateName, RuntimeFault, RemoteException { return new Datacenter(getServerConnection(), getVimService().createDatacenter(getMOR(), name) ); }
public Task unregisterAndDestroy_Task() throws InvalidState, ConcurrentAccess, RuntimeFault, RemoteException { return new Task( getServerConnection(), getVimService().unregisterAndDestroy_Task(getMOR()) ); } }
public ClusterComputeResource createCluster(String name, ClusterConfigSpec spec) throws InvalidName, DuplicateName, RuntimeFault, RemoteException { return new ClusterComputeResource(getServerConnection(), getVimService().createCluster(getMOR(), name, spec) ); }
public Folder createFolder(String name) throws InvalidName, DuplicateName, RuntimeFault, RemoteException { return new Folder(getServerConnection(), getVimService().createFolder(getMOR(), name) ); }
public Task addStandaloneHost_Task(HostConnectSpec spec, ComputeResourceConfigSpec compResSpec, boolean addConnected, String license) throws InvalidLogin, HostConnectFault, RuntimeFault, RemoteException { return new Task(getServerConnection(), getVimService().addStandaloneHost_Task(getMOR(), spec, compResSpec, addConnected, license)); }
/** * @since 4.0 */ public Task createDVS_Task(DVSCreateSpec spec) throws DvsNotAuthorized, DvsFault, DuplicateName, InvalidName, NotFound, RuntimeFault, RemoteException { ManagedObjectReference taskMor = getVimService().createDVS_Task(getMOR(), spec); return new Task(getServerConnection(), taskMor); }
public ClusterComputeResource createClusterEx(String name, ClusterConfigSpecEx spec) throws InvalidName, DuplicateName, RuntimeFault, RemoteException { return new ClusterComputeResource(getServerConnection(), getVimService().createClusterEx(getMOR(), name, spec) ); }
/** * @since SDK5.0 */ public StoragePod createStoragePod(String name) throws DuplicateName, InvalidName, RuntimeFault, RemoteException { ManagedObjectReference mor = getVimService().createStoragePod(getMOR(), name); return new StoragePod(getServerConnection(), mor); }
/** @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 Task createVM_Task(VirtualMachineConfigSpec config, ResourcePool pool, HostSystem host) throws InvalidName, VmConfigFault, DuplicateName, FileFault, OutOfBounds, InsufficientResourcesFault, InvalidDatastore, RuntimeFault, RemoteException { return new Task(getServerConnection(), getVimService().createVM_Task(getMOR(), config, pool.getMOR(), host==null? null : host.getMOR()) ); }
/** @since SDK4.0 */ public HttpNfcLease importVApp(ImportSpec spec, Folder folder, HostSystem host) throws VmConfigFault, FileFault, OutOfBounds, DuplicateName, InvalidName, InvalidDatastore, InsufficientResourcesFault, RuntimeFault, RemoteException { ManagedObjectReference mor = getVimService().importVApp(getMOR(), spec, folder==null? null : folder.getMOR(), host==null? null : host.getMOR()); return new HttpNfcLease(getServerConnection(), mor); }
public Task registerVM_Task(String path, String name, boolean asTemplate, ResourcePool pool, HostSystem host) throws VmConfigFault, InvalidName, DuplicateName, FileFault, OutOfBounds, InsufficientResourcesFault, InvalidDatastore, AlreadyExists, NotFound, RuntimeFault, RemoteException { return new Task( getServerConnection(), getVimService().registerVM_Task(getMOR(), path, name, asTemplate, pool==null? null : pool.getMOR(), host==null? null : host.getMOR()) ); }
private void createEventHistoryCollector() throws Exception { // Create an Entity Event Filter Spec to // specify the MoRef of the VM to be get events filtered for EventFilterSpecByEntity entitySpec = new EventFilterSpecByEntity(); entitySpec.setEntity(_rootFolder.getMOR()); entitySpec.setRecursion(EventFilterSpecRecursionOption.children); // set the entity spec in the EventFilter EventFilterSpec eventFilter = new EventFilterSpec(); eventFilter.setEntity(entitySpec); // we are only interested in getting events for the VM. // Add as many events you want to track relating to vm. // Refer to API Data Object vmEvent and see the extends class list for // elaborate list of vmEvents eventFilter.setType(new String[] { "VmPoweredOffEvent", "VmPoweredOnEvent", "VmSuspendedEvent", "VmRenamedEvent" }); // create the EventHistoryCollector to monitor events for a VM // and get the ManagedObjectReference of the EventHistoryCollector // returned _eventHistoryCollector = _eventManager .createCollectorForEvents(eventFilter); }
private void createEventHistoryCollector() throws Exception { // Create an Entity Event Filter Spec to // specify the MoRef of the VM to be get events filtered for EventFilterSpecByEntity entitySpec = new EventFilterSpecByEntity(); entitySpec.setEntity(_rootFolder.getMOR()); entitySpec.setRecursion(EventFilterSpecRecursionOption.children); // set the entity spec in the EventFilter EventFilterSpec eventFilter = new EventFilterSpec(); eventFilter.setEntity(entitySpec); // we are only interested in getting events for the VM. // Add as many events you want to track relating to vm. // Refer to API Data Object vmEvent and see the extends class list for // elaborate list of vmEvents eventFilter.setType(new String[] { "VmPoweredOffEvent", "VmPoweredOnEvent", "VmSuspendedEvent", "VmRenamedEvent" }); // create the EventHistoryCollector to monitor events for a VM // and get the ManagedObjectReference of the EventHistoryCollector // returned _eventHistoryCollector = _eventManager .createCollectorForEvents(eventFilter); }
eFilter.setEntity(si.getRootFolder().getMOR()); eFilter.setRecursion( EventFilterSpecRecursionOption.children);
eFilter.setEntity(si.getRootFolder().getMOR()); eFilter.setRecursion(EventFilterSpecRecursionOption.children); efs.setEntity(eFilter);