|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.virtualbox_4_1.IUnknown
org.virtualbox_4_1.IGuest
public class IGuest
The IGuest interface represents information about the operating system
running inside the virtual machine. Used in
IConsole.getGuest().
IGuest provides information about the guest operating system, whether
Guest Additions are installed and other OS-specific virtual machine
properties.
Interface ID: {ED109B6E-0578-4B17-8ACE-52646789F1A0}
| Field Summary |
|---|
| Fields inherited from class org.virtualbox_4_1.IUnknown |
|---|
obj, port |
| Constructor Summary | |
|---|---|
IGuest(java.lang.String wrapped,
org.virtualbox_4_1.jaxws.VboxPortType port)
|
|
| Method Summary | |
|---|---|
IProgress |
copyFromGuest(java.lang.String source,
java.lang.String dest,
java.lang.String userName,
java.lang.String password,
java.lang.Long flags)
Copies files/directories from guest to the host. |
IProgress |
copyToGuest(java.lang.String source,
java.lang.String dest,
java.lang.String userName,
java.lang.String password,
java.lang.Long flags)
Copies files/directories from host to the guest. |
void |
directoryClose(java.lang.Long handle)
Closes a formerly opened guest directory. |
void |
directoryCreate(java.lang.String directory,
java.lang.String userName,
java.lang.String password,
java.lang.Long mode,
java.lang.Long flags)
Creates a directory on the guest. |
java.lang.Long |
directoryOpen(java.lang.String directory,
java.lang.String filter,
java.lang.Long flags,
java.lang.String userName,
java.lang.String password)
Opens a directory on the guest. |
IGuestDirEntry |
directoryRead(java.lang.Long handle)
Reads the next directory entry of an opened guest directory. |
IProgress |
executeProcess(java.lang.String execName,
java.lang.Long flags,
java.util.List<java.lang.String> arguments,
java.util.List<java.lang.String> environment,
java.lang.String userName,
java.lang.String password,
java.lang.Long timeoutMS,
Holder<java.lang.Long> pid)
Executes an existing program inside the guest VM. |
java.lang.Boolean |
fileExists(java.lang.String file,
java.lang.String userName,
java.lang.String password)
Checks if the specified file name exists and is a regular file. |
java.lang.Long |
fileQuerySize(java.lang.String file,
java.lang.String userName,
java.lang.String password)
Queries the size of a file, given the path to it. |
AdditionsRunLevelType |
getAdditionsRunLevel()
Current run level of the Guest Additions. |
java.lang.Boolean |
getAdditionsStatus(AdditionsRunLevelType level)
Retrieve the current status of a certain Guest Additions run level. |
java.lang.String |
getAdditionsVersion()
Version of the Guest Additions including the revision (3 decimal numbers separated by dots + revision number) installed on the guest or empty when the Additions are not installed. |
java.util.List<IAdditionsFacility> |
getFacilities()
Array of current known facilities. |
AdditionsFacilityStatus |
getFacilityStatus(AdditionsFacilityType facility,
Holder<java.lang.Long> timestamp)
Get the current status of a Guest Additions facility. |
java.lang.Long |
getMemoryBalloonSize()
Guest system memory balloon size in megabytes (transient property). |
java.lang.String |
getOSTypeId()
Identifier of the Guest OS type as reported by the Guest Additions. |
byte[] |
getProcessOutput(java.lang.Long pid,
java.lang.Long flags,
java.lang.Long timeoutMS,
java.lang.Long size)
Retrieves output of a formerly started process. |
ExecuteProcessStatus |
getProcessStatus(java.lang.Long pid,
Holder<java.lang.Long> exitcode,
Holder<java.lang.Long> flags)
Retrieves status, exit code and the exit reason of a formerly started process. |
java.lang.Long |
getStatisticsUpdateInterval()
Interval to update guest statistics in seconds. |
void |
internalGetStatistics(Holder<java.lang.Long> cpuUser,
Holder<java.lang.Long> cpuKernel,
Holder<java.lang.Long> cpuIdle,
Holder<java.lang.Long> memTotal,
Holder<java.lang.Long> memFree,
Holder<java.lang.Long> memBalloon,
Holder<java.lang.Long> memShared,
Holder<java.lang.Long> memCache,
Holder<java.lang.Long> pagedTotal,
Holder<java.lang.Long> memAllocTotal,
Holder<java.lang.Long> memFreeTotal,
Holder<java.lang.Long> memBalloonTotal,
Holder<java.lang.Long> memSharedTotal)
Internal method; do not use as it might change at any time. |
static IGuest |
queryInterface(IUnknown obj)
|
void |
setCredentials(java.lang.String userName,
java.lang.String password,
java.lang.String domain,
java.lang.Boolean allowInteractiveLogon)
Store login credentials that can be queried by guest operating systems with Additions installed. |
void |
setMemoryBalloonSize(java.lang.Long value)
Guest system memory balloon size in megabytes (transient property). |
java.lang.Long |
setProcessInput(java.lang.Long pid,
java.lang.Long flags,
java.lang.Long timeoutMS,
byte[] data)
Sends input into a formerly started process. |
void |
setStatisticsUpdateInterval(java.lang.Long value)
Interval to update guest statistics in seconds. |
IProgress |
updateGuestAdditions(java.lang.String source,
java.lang.Long flags)
Updates already installed Guest Additions in a VM (Windows guests only). |
| Methods inherited from class org.virtualbox_4_1.IUnknown |
|---|
getRemoteWSPort, getWrapped, releaseRemote |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IGuest(java.lang.String wrapped,
org.virtualbox_4_1.jaxws.VboxPortType port)
| Method Detail |
|---|
public java.lang.String getOSTypeId()
IVirtualBox.getGuestOSType(String) to obtain
an IGuestOSType object representing details about the given
Guest OS type.
NOTE:
If Guest Additions are not installed, this value will be
the same as IMachine.getOSTypeId().
public AdditionsRunLevelType getAdditionsRunLevel()
public java.lang.String getAdditionsVersion()
public java.util.List<IAdditionsFacility> getFacilities()
public java.lang.Long getMemoryBalloonSize()
public void setMemoryBalloonSize(java.lang.Long value)
value - Longpublic java.lang.Long getStatisticsUpdateInterval()
public void setStatisticsUpdateInterval(java.lang.Long value)
value - Longpublic static IGuest queryInterface(IUnknown obj)
public void internalGetStatistics(Holder<java.lang.Long> cpuUser,
Holder<java.lang.Long> cpuKernel,
Holder<java.lang.Long> cpuIdle,
Holder<java.lang.Long> memTotal,
Holder<java.lang.Long> memFree,
Holder<java.lang.Long> memBalloon,
Holder<java.lang.Long> memShared,
Holder<java.lang.Long> memCache,
Holder<java.lang.Long> pagedTotal,
Holder<java.lang.Long> memAllocTotal,
Holder<java.lang.Long> memFreeTotal,
Holder<java.lang.Long> memBalloonTotal,
Holder<java.lang.Long> memSharedTotal)
cpuUser - Percentage of processor time spent in user mode as seen by the guest.cpuKernel - Percentage of processor time spent in kernel mode as seen by the guest.cpuIdle - Percentage of processor time spent idling as seen by the guest.memTotal - Total amount of physical guest RAM.memFree - Free amount of physical guest RAM.memBalloon - Amount of ballooned physical guest RAM.memShared - Amount of shared physical guest RAM.memCache - Total amount of guest (disk) cache memory.pagedTotal - Total amount of space in the page file.memAllocTotal - Total amount of memory allocated by the hypervisor.memFreeTotal - Total amount of free memory available in the hypervisor.memBalloonTotal - Total amount of memory ballooned by the hypervisor.memSharedTotal - Total amount of shared memory in the hypervisor.
public AdditionsFacilityStatus getFacilityStatus(AdditionsFacilityType facility,
Holder<java.lang.Long> timestamp)
facility - Facility to check status for.timestamp - Timestamp (in ms) of last status update seen by the host.
public java.lang.Boolean getAdditionsStatus(AdditionsRunLevelType level)
level - Status level to check
| @link ::VBOX_E_NOT_SUPPORTED VBOX_E_NOT_SUPPORTED | Wrong status level specified. |
public void setCredentials(java.lang.String userName,
java.lang.String password,
java.lang.String domain,
java.lang.Boolean allowInteractiveLogon)
userName - User name string, can be emptypassword - Password string, can be emptydomain - Domain name (guest logon scheme specific), can be emptyallowInteractiveLogon - Flag whether the guest should alternatively allow the user to
interactively specify different credentials. This flag might
not be supported by all versions of the Additions.
Expected result codes:
| @link ::VBOX_E_VM_ERROR VBOX_E_VM_ERROR | VMM device is not available. |
public IProgress executeProcess(java.lang.String execName,
java.lang.Long flags,
java.util.List<java.lang.String> arguments,
java.util.List<java.lang.String> environment,
java.lang.String userName,
java.lang.String password,
java.lang.Long timeoutMS,
Holder<java.lang.Long> pid)
execName - Full path name of the command to execute on the guest; the
commands has to exists in the guest VM in order to be executed.flags - ExecuteProcessFlag flags.arguments - Array of arguments passed to the execution command.environment - Environment variables that can be set while the command is being
executed, in form of "NAME=VALUE"; one pair per entry. To unset a
variable just set its name ("NAME") without a value.userName - User name under which the command will be executed; has to exist
and have the appropriate rights to execute programs in the VM.password - Password of the user account specified.timeoutMS - The maximum timeout value (in msec) to wait for finished program
execution. Pass 0 for an infinite timeout.pid - The PID (process ID) of the started command for later reference.
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Could not execute process. |
public byte[] getProcessOutput(java.lang.Long pid,
java.lang.Long flags,
java.lang.Long timeoutMS,
java.lang.Long size)
pid - Process id returned by earlier executeProcess(String,Long,List,List,String,String,Long,Holder) call.flags - ProcessOutputFlag flags.timeoutMS - The maximum timeout value (in msec) to wait for output
data. Pass 0 for an infinite timeout.size - Size in bytes to read in the buffer.
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Could not retrieve output. |
public ExecuteProcessStatus getProcessStatus(java.lang.Long pid,
Holder<java.lang.Long> exitcode,
Holder<java.lang.Long> flags)
pid - Process id returned by earlier executeProcess(String,Long,List,List,String,String,Long,Holder) call.exitcode - The exit code (if available).flags - Additional flags of process status. Not used at the moment and
must be set to 0.
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Process with specified PID was not found. |
public IProgress copyFromGuest(java.lang.String source,
java.lang.String dest,
java.lang.String userName,
java.lang.String password,
java.lang.Long flags)
source - Source file on the guest to copy.dest - Destination path on the host.userName - User name under which the copy command will be executed; the
user has to exist and have the appropriate rights to read from
the source path.password - Password of the user account specified.flags - CopyFileFlag flags. Not used at the moment and should be set to 0.
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Error while copying. |
public IProgress copyToGuest(java.lang.String source,
java.lang.String dest,
java.lang.String userName,
java.lang.String password,
java.lang.Long flags)
source - Source file on the host to copy.dest - Destination path on the guest.userName - User name under which the copy command will be executed; the
user has to exist and have the appropriate rights to write to
the destination path.password - Password of the user account specified.flags - CopyFileFlag flags. Not used at the moment and should be set to 0.
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Error while copying. |
public void directoryClose(java.lang.Long handle)
handle - Handle of opened directory to close.
Expected result codes:
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Error while closing directory. |
public void directoryCreate(java.lang.String directory,
java.lang.String userName,
java.lang.String password,
java.lang.Long mode,
java.lang.Long flags)
directory - Directory to create.userName - User name under which the directory creation will be executed; the
user has to exist and have the appropriate rights to create the
desired directory.password - Password of the user account specified.mode - File mode.flags - DirectoryCreateFlag flags.
Expected result codes:
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Error while creating directory. |
public java.lang.Long directoryOpen(java.lang.String directory,
java.lang.String filter,
java.lang.Long flags,
java.lang.String userName,
java.lang.String password)
directory - Directory to read.filter - Directory filter (DOS style wildcards). Set to empty
string if no filter required.flags - DirectoryOpenFlag flags.userName - User name under which the directory reading will be performed; the
user has to exist and have the appropriate rights to access / read the
desired directory.password - Password of the user account specified.
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Error while opening / reading directory. |
public IGuestDirEntry directoryRead(java.lang.Long handle)
handle - Handle of opened directory returned by openDirectory.
| E_ABORT | When the end of the directory has been reached. |
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Error while opening / reading directory. |
public java.lang.Boolean fileExists(java.lang.String file,
java.lang.String userName,
java.lang.String password)
file - Full path of file to check.userName - User name under which the lookup will be performed; the
user has to exist and have the appropriate rights to access / read the
desired directory.password - Password of the user account specified.
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Error while looking up information. |
public java.lang.Long fileQuerySize(java.lang.String file,
java.lang.String userName,
java.lang.String password)
file - Full path of file to query file size for.userName - User name under which the lookup will be performed; the
user has to exist and have the appropriate rights to access / read the
desired directory.password - Password of the user account specified.
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Error while looking up information. |
public java.lang.Long setProcessInput(java.lang.Long pid,
java.lang.Long flags,
java.lang.Long timeoutMS,
byte[] data)
pid - Process id returned by earlier executeProcess(String,Long,List,List,String,String,Long,Holder) call.flags - ProcessInputFlag flags.timeoutMS - The maximum timeout value (in msec) to wait for getting the
data transfered to the guest. Pass 0 for an infinite timeout.data - Buffer of input data to send to the started process to.
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Could not send input. |
public IProgress updateGuestAdditions(java.lang.String source,
java.lang.Long flags)
source - Path to the Guest Additions .ISO file to use for the upate.flags - AdditionsUpdateFlag flags.
| @link ::VBOX_E_IPRT_ERROR VBOX_E_IPRT_ERROR | Error while updating. |
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||