private VirtualMachineSnapshot getCurrentSnapshotOrCreate(String snapshotName, String snapshotDescription, VirtualMachine master) throws InvalidName, VmConfigFault, SnapshotFault, TaskInProgress, FileFault, InvalidState, RuntimeFault, RemoteException { if (master.getSnapshot() == null) { Task task = master.createSnapshot_Task(snapshotName, snapshotDescription, false, false); try { if (task.waitForTask().equals(Task.SUCCESS)) { logger.debug(String.format("snapshot taken for '%s'", master.getName())); } } catch (Exception e) { logger.debug(String.format("Can't take snapshot for '%s'", master.getName()), e); throw propagate(e); } } else logger.debug(String.format("snapshot already available for '%s'", master.getName())); return master.getCurrentSnapShot(); }
/** * Remove the device. Make sure the VM is powered off before calling this method. * If destroyDeviceBacking is true, it deletes backings for example files in datastore. BE CAREFUL! */ public Task removeDevice(VirtualDevice device, boolean destroyDeviceBacking) throws InvalidName, VmConfigFault, DuplicateName, TaskInProgress, FileFault, InvalidState, ConcurrentAccess, InvalidDatastore, InsufficientResourcesFault, RuntimeFault, RemoteException { ArrayList<VirtualDevice> deviceList = new ArrayList<VirtualDevice>(); deviceList.add(device); return removeDevices(deviceList, destroyDeviceBacking); }
/** * Create an instance of {@link JAXBElement }{@code <}{@link TaskInProgress }{@code >}} * */ @XmlElementDecl(namespace = "urn:pbm", name = "TaskInProgressFault") public JAXBElement<TaskInProgress> createTaskInProgressFault(TaskInProgress value) { return new JAXBElement<TaskInProgress>(_TaskInProgressFault_QNAME, TaskInProgress.class, null, value); }
/** * @param floppyImagePath - i.e. "[storage1] myVM/myFloppy.flp" Note: there is a space after ]. */ public Task addFloppyDriveFromISO(String floppyImagePath, boolean startConnected) throws InvalidName, VmConfigFault, DuplicateName, TaskInProgress, FileFault, InvalidState, ConcurrentAccess, InvalidDatastore, InsufficientResourcesFault, RuntimeFault, RemoteException { return addFloppyDrive(floppyImagePath, null, null, startConnected); }
/** * @param hostDevice - i.e. "/dev/fd0" */ public Task addFloppyDriveFromHost(String hostDevice, boolean startConnected) throws InvalidName, VmConfigFault, DuplicateName, TaskInProgress, FileFault, InvalidState, ConcurrentAccess, InvalidDatastore, InsufficientResourcesFault, RuntimeFault, RemoteException { return addFloppyDrive(null, null, hostDevice, startConnected); }
public Task createFloppyDrive(String floppyImagePath, boolean startConnected) throws InvalidName, VmConfigFault, DuplicateName, TaskInProgress, FileFault, InvalidState, ConcurrentAccess, InvalidDatastore, InsufficientResourcesFault, RuntimeFault, RemoteException { return addFloppyDrive(null, floppyImagePath, null, startConnected); }
public void changeFileAttributesInGuest(GuestAuthentication auth, String guestFilePath, GuestFileAttributes fileAttributes) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException { getVimService().changeFileAttributesInGuest(getMOR(), vm.getMOR(), auth, guestFilePath, fileAttributes); }
public String createTemporaryDirectoryInGuest(GuestAuthentication auth, String prefix, String suffix, String directoryPath) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException { return getVimService().createTemporaryDirectoryInGuest(getMOR(), vm.getMOR(), auth, prefix, suffix, directoryPath); }
public String createTemporaryFileInGuest(GuestAuthentication auth, String prefix, String suffix, String directoryPath) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException { return getVimService().createTemporaryFileInGuest(getMOR(), vm.getMOR(), auth, prefix, suffix, directoryPath); }
public void deleteDirectoryInGuest(GuestAuthentication auth, String directoryPath, boolean recursive) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException { getVimService().deleteDirectoryInGuest(getMOR(), vm.getMOR(), auth, directoryPath, recursive); }
public void deleteFileInGuest(GuestAuthentication auth, String filePath) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException { getVimService().deleteFileInGuest(getMOR(), vm.getMOR(), auth, filePath); }
public FileTransferInformation initiateFileTransferFromGuest(GuestAuthentication auth, String guestFilePath) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException { return getVimService().initiateFileTransferFromGuest(getMOR(), vm.getMOR(), auth, guestFilePath); }
public String initiateFileTransferToGuest(GuestAuthentication auth, String guestFilePath, GuestFileAttributes fileAttributes, long fileSize, boolean overwrite) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException { return getVimService().initiateFileTransferToGuest(getMOR(), vm.getMOR(), auth, guestFilePath, fileAttributes, fileSize, overwrite); }
public GuestListFileInfo listFilesInGuest(GuestAuthentication auth, String filePath, int index, int maxResults, String matchPattern) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException { return getVimService().listFilesInGuest(getMOR(), vm.getMOR(), auth, filePath, index, maxResults, matchPattern); }
public void makeDirectoryInGuest(GuestAuthentication auth, String directoryPath, boolean createParentDirectories) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException { getVimService().makeDirectoryInGuest(getMOR(), vm.getMOR(), auth, directoryPath, createParentDirectories); }
public void moveDirectoryInGuest(GuestAuthentication auth, String srcDirectoryPath, String dstDirectoryPath) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException { getVimService().moveDirectoryInGuest(getMOR(), vm.getMOR(), auth, srcDirectoryPath, dstDirectoryPath); }
public void moveFileInGuest(GuestAuthentication auth, String srcFilePath, String dstFilePath, boolean overwrite) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException { getVimService().moveFileInGuest(getMOR(), vm.getMOR(), auth, srcFilePath, dstFilePath, overwrite); }
public OvfCreateDescriptorResult createDescriptor(ManagedEntity obj, OvfCreateDescriptorParams cdp) throws TaskInProgress, VmConfigFault, ConcurrentAccess, FileFault, InvalidState, RuntimeFault, RemoteException { return getVimService().createDescriptor(getMOR(), obj.getMOR(), cdp); }
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); }
public OvfParseDescriptorResult parseDescriptor(String ovfDescriptor, OvfParseDescriptorParams pdp) throws TaskInProgress, VmConfigFault, ConcurrentAccess, FileFault, InvalidState, RuntimeFault, RemoteException { return getVimService().parseDescriptor(getMOR(), ovfDescriptor, pdp); }
public OvfValidateHostResult validateHost(String ovfDescriptor, HostSystem host, OvfValidateHostParams vhp) throws TaskInProgress, ConcurrentAccess, FileFault, InvalidState, RuntimeFault, RemoteException { return getVimService().validateHost(getMOR(), ovfDescriptor, host.getMOR(), vhp); }
public Task performDvsProductSpecOperation_Task(String operation, DistributedVirtualSwitchProductSpec productSpec) throws TaskInProgress, InvalidState, DvsFault, RuntimeFault, RemoteException { ManagedObjectReference taskMor = getVimService().performDvsProductSpecOperation_Task(getMOR(), operation, productSpec); return new Task(getServerConnection(), taskMor); }
public Task cloneVApp_Task(String name, ManagedObjectReference target, VAppCloneSpec spec) throws InvalidState, InvalidDatastore, TaskInProgress, VmConfigFault, FileFault, MigrationFault, InsufficientResourcesFault, RuntimeFault, RemoteException { ManagedObjectReference taskMor = getVimService().cloneVApp_Task(getMOR(), name, target, spec); return new Task(getServerConnection(), taskMor); }
public HttpNfcLease exportVApp() throws InvalidPowerState, TaskInProgress, InvalidState, FileFault, RuntimeFault, RemoteException { ManagedObjectReference mor = getVimService().exportVApp(getMOR()); return new HttpNfcLease(getServerConnection(), mor); }
public Task powerOffVApp_Task(boolean force) throws TaskInProgress, InvalidState, VAppConfigFault, RuntimeFault, RemoteException { ManagedObjectReference taskMor = getVimService().powerOffVApp_Task(getMOR(), force); return new Task(getServerConnection(), taskMor); }
/** @since SDK4.1 */ public Task suspendVApp_Task() throws TaskInProgress, InvalidState, VAppConfigFault, RuntimeFault, RemoteException { ManagedObjectReference taskMor = getVimService().suspendVApp_Task(getMOR()); return new Task(getServerConnection(), taskMor); }
public Task powerOnVApp_Task() throws TaskInProgress, InvalidState, InsufficientResourcesFault, VmConfigFault, VAppConfigFault, FileFault, RuntimeFault, RemoteException { ManagedObjectReference taskMor = getVimService().powerOnVApp_Task(getMOR()); return new Task(getServerConnection(), taskMor); }
public void updateVAppConfig(VAppConfigSpec spec) throws TaskInProgress, VmConfigFault, ConcurrentAccess, FileFault, InvalidName, DuplicateName, InvalidState, InsufficientResourcesFault, InvalidDatastore, RuntimeFault, RemoteException { getVimService().updateVAppConfig(getMOR(), spec); }
public GuestAuthentication acquireCredentialsInGuest(GuestAuthentication requestedAuth, long sessionID) throws GuestOperationsFault, TaskInProgress, InvalidState, RuntimeFault, RemoteException { return getVimService().acquireCredentialsInGuest(this.getMOR(), vm.getMOR(), requestedAuth, sessionID); }
public void releaseCredentialsInGuest(GuestAuthentication auth) throws GuestOperationsFault, TaskInProgress, InvalidState, RuntimeFault, RemoteException { getVimService().releaseCredentialsInGuest(getMOR(), vm.getMOR(), auth); }
public Task joinDomain_Task(String domainName, String userName, String password) throws InvalidState, HostConfigFault, InvalidLogin, ActiveDirectoryFault, TaskInProgress, RuntimeFault, RemoteException { ManagedObjectReference mor = getVimService().joinDomain_Task(getMOR(), domainName, userName, password); return new Task(getServerConnection(), mor); }
/** * @since SDK5.0 */ public Task joinDomainWithCAM_Task(String domainName, String camServer) throws InvalidState, HostConfigFault, ActiveDirectoryFault, TaskInProgress, RuntimeFault, RemoteException { ManagedObjectReference mor = getVimService().joinDomainWithCAM_Task(getMOR(), domainName, camServer); return new Task(getServerConnection(), mor); }
public Task leaveCurrentDomain_Task(boolean force) throws InvalidState, AuthMinimumAdminPermission, ActiveDirectoryFault, TaskInProgress, RuntimeFault, RemoteException { ManagedObjectReference mor = getVimService().leaveCurrentDomain_Task(getMOR(), force); return new Task(getServerConnection(), mor); }
public GuestProcessInfo[] listProcessesInGuest(GuestAuthentication auth, long[] pids) throws GuestOperationsFault, InvalidState, TaskInProgress, RuntimeFault, RemoteException { return getVimService().listProcessesInGuest(getMOR(), vm.getMOR(), auth, pids); }
public String[] readEnvironmentVariableInGuest(GuestAuthentication auth, String[] names) throws GuestOperationsFault, InvalidState, TaskInProgress, RuntimeFault, RemoteException { return getVimService().readEnvironmentVariableInGuest(getMOR(), vm.getMOR(), auth, names); }
public long startProgramInGuest(GuestAuthentication auth, GuestProgramSpec spec) throws GuestOperationsFault, InvalidState, TaskInProgress, FileFault, RuntimeFault, RemoteException { return getVimService().startProgramInGuest(getMOR(), vm.getMOR(), auth, spec); }
public void terminateProcessInGuest(GuestAuthentication auth, long pid) throws GuestOperationsFault, InvalidState, TaskInProgress, RuntimeFault, RemoteException { getVimService().terminateProcessInGuest(getMOR(), vm.getMOR(), auth, pid); }
/** ** It should have returned a boolean, but... * Watch out GuestPermissionDenied (subtype of GuestOperationsFault) * for invalid authentication. */ public void ValidateCredentialsInGuest(GuestAuthentication auth) throws GuestOperationsFault, InvalidState, TaskInProgress, RuntimeFault, RemoteException { getVimService().validateCredentialsInGuest(getMOR(), vm.getMOR(), auth); }