VirtualBox Main API
|
The IHost interface represents the physical machine that this VirtualBox installation runs on. More...
Public Member Functions | |
void | getProcessorSpeed (in unsigned long cpuId, [retval] out unsigned long speed) |
Query the (approximate) maximum speed of a specified host CPU in Megahertz. | |
void | getProcessorFeature (in ProcessorFeature feature, [retval] out boolean supported) |
Query whether a CPU feature is supported or not. | |
void | getProcessorDescription (in unsigned long cpuId, [retval] out wstring description) |
Query the model string of a specified host CPU. | |
void | createHostOnlyNetworkInterface (out IHostNetworkInterface hostInterface, [retval] out IProgress progress) |
Creates a new adapter for Host Only Networking. | |
void | removeHostOnlyNetworkInterface (in wstringUUID id, [retval] out IProgress progress) |
Removes the given Host Only Networking interface. | |
void | createUSBDeviceFilter (in wstring name, [retval] out IHostUSBDeviceFilter filter) |
Creates a new USB device filter. | |
void | insertUSBDeviceFilter (in unsigned long position, in IHostUSBDeviceFilter filter) |
Inserts the given USB device to the specified position in the list of filters. | |
void | removeUSBDeviceFilter (in unsigned long position) |
Removes a USB device filter from the specified position in the list of filters. | |
void | findHostDVDDrive (in wstring name, [retval] out IMedium drive) |
Searches for a host DVD drive with the given name . | |
void | findHostFloppyDrive (in wstring name, [retval] out IMedium drive) |
Searches for a host floppy drive with the given name . | |
void | findHostNetworkInterfaceByName (in wstring name, [retval] out IHostNetworkInterface networkInterface) |
Searches through all host network interfaces for an interface with the given name . | |
void | findHostNetworkInterfaceById (in wstringUUID id, [retval] out IHostNetworkInterface networkInterface) |
Searches through all host network interfaces for an interface with the given GUID. | |
void | findHostNetworkInterfacesOfType (in HostNetworkInterfaceType type, [retval] out IHostNetworkInterface[] networkInterfaces) |
Searches through all host network interfaces and returns a list of interfaces of the specified type. | |
void | findUSBDeviceById (in wstringUUID id, [retval] out IHostUSBDevice device) |
Searches for a USB device with the given UUID. | |
void | findUSBDeviceByAddress (in wstring name, [retval] out IHostUSBDevice device) |
Searches for a USB device with the given host address. | |
void | generateMACAddress ([retval] out wstring address) |
Generates a valid Ethernet MAC address, 12 hexadecimal characters. | |
void | addUSBDeviceSource (in wstring backend, in wstring id, in wstring address, in wstring[] propertyNames, in wstring[] propertyValues) |
Adds a new USB device source. | |
void | removeUSBDeviceSource (in wstring id) |
Removes a previously added USB device source. | |
void | isExecutionEngineSupported (in CPUArchitecture cpuArchitecture, in VMExecutionEngine executionEngine, [retval] out boolean isSupported) |
Returns whether the given execution engine is supported on the host. | |
Public Attributes | |
readonly attribute PlatformArchitecture | architecture |
Platform architecture type. | |
readonly attribute IHostX86 | x86 |
Associated object for x86 host specifics. | |
readonly attribute IMedium[] | DVDDrives |
List of DVD drives available on the host. | |
readonly attribute IMedium[] | floppyDrives |
List of floppy drives available on the host. | |
readonly attribute IHostAudioDevice[] | audioDevices |
List of audio devices currently available on the host. | |
readonly attribute IHostUSBDevice[] | USBDevices |
List of USB devices currently attached to the host. | |
readonly attribute IHostUSBDeviceFilter[] | USBDeviceFilters |
List of USB device filters in action. | |
readonly attribute IHostNetworkInterface[] | networkInterfaces |
List of host network interfaces currently defined on the host. | |
readonly attribute wstring[] | nameServers |
The list of nameservers registered in host's name resolving system. | |
readonly attribute wstring | domainName |
Domain name used for name resolving. | |
readonly attribute wstring[] | searchStrings |
Search string registered for name resolving. | |
readonly attribute unsigned long | processorCount |
Number of (logical) CPUs installed in the host system. | |
readonly attribute unsigned long | processorOnlineCount |
Number of (logical) CPUs online in the host system. | |
readonly attribute unsigned long | processorCoreCount |
Number of physical processor cores installed in the host system. | |
readonly attribute unsigned long | processorOnlineCoreCount |
Number of physical processor cores online in the host system. | |
readonly attribute IHostDrive[] | hostDrives |
List of the host drive available to use in the VirtualBox. | |
readonly attribute unsigned long | memorySize |
Amount of system memory in megabytes installed in the host system. | |
readonly attribute unsigned long | memoryAvailable |
Available system memory in the host system. | |
readonly attribute wstring | operatingSystem |
Name of the host system's operating system. | |
readonly attribute wstring | OSVersion |
Host operating system's version string. | |
readonly attribute long long | UTCTime |
Returns the current host time in milliseconds since 1970-01-01 UTC. | |
readonly attribute IHostVideoInputDevice[] | videoInputDevices |
List of currently available host video capture devices. | |
readonly attribute IUpdateAgent | updateHost |
Checks for new VirtualBox host versions. | |
readonly attribute IUpdateAgent | updateExtPack |
Checks for new VirtualBox Extension Pack versions. | |
readonly attribute IUpdateAgent | updateGuestAdditions |
Checks for new Guest Additions versions. | |
The IHost interface represents the physical machine that this VirtualBox installation runs on.
An object implementing this interface is returned by the IVirtualBox::host attribute. This interface contains read-only information about the host's physical hardware (such as what processors and disks are available, what the host operating system is, and so on) and also allows for manipulating some of the host's hardware, such as global USB device filters and host interface networking.
{D5DCECE0-B202-4416-A138-03502784CC07}
void IHost::getProcessorSpeed | ( | in unsigned long | cpuId, |
[retval] out unsigned long | speed | ||
) |
Query the (approximate) maximum speed of a specified host CPU in Megahertz.
cpuId | Identifier of the CPU. |
speed | Speed value. 0 is returned if value is not known or cpuId is invalid. |
void IHost::getProcessorFeature | ( | in ProcessorFeature | feature, |
[retval] out boolean | supported | ||
) |
Query whether a CPU feature is supported or not.
feature | CPU Feature identifier. |
supported | Feature is supported or not. |
void IHost::getProcessorDescription | ( | in unsigned long | cpuId, |
[retval] out wstring | description | ||
) |
Query the model string of a specified host CPU.
cpuId | Identifier of the CPU. |
description | Model string. An empty string is returned if value is not known or cpuId is invalid. |
void IHost::createHostOnlyNetworkInterface | ( | out IHostNetworkInterface | hostInterface, |
[retval] out IProgress | progress | ||
) |
Creates a new adapter for Host Only Networking.
hostInterface | Created host interface object. |
progress | Progress object to track the operation completion. |
E_INVALIDARG | Host network interface name already exists. |
void IHost::removeHostOnlyNetworkInterface | ( | in wstringUUID | id, |
[retval] out IProgress | progress | ||
) |
Removes the given Host Only Networking interface.
id | Adapter GUID. |
progress | Progress object to track the operation completion. |
VBOX_E_OBJECT_NOT_FOUND | No host network interface matching id found. |
void IHost::createUSBDeviceFilter | ( | in wstring | name, |
[retval] out IHostUSBDeviceFilter | filter | ||
) |
Creates a new USB device filter.
All attributes except the filter name are set to empty (any match), active is false
(the filter is not active).
The created filter can be added to the list of filters using insertUSBDeviceFilter.
name | Filter name. See IUSBDeviceFilter::name for more information. |
filter | Created filter object. |
void IHost::insertUSBDeviceFilter | ( | in unsigned long | position, |
in IHostUSBDeviceFilter | filter | ||
) |
Inserts the given USB device to the specified position in the list of filters.
Positions are numbered starting from 0
. If the specified position is equal to or greater than the number of elements in the list, the filter is added at the end of the collection.
position | Position to insert the filter to. |
filter | USB device filter to insert. |
VBOX_E_INVALID_OBJECT_STATE | USB device filter is not created within this VirtualBox instance. |
E_INVALIDARG | USB device filter already in list. |
E_NOTIMPL
.void IHost::removeUSBDeviceFilter | ( | in unsigned long | position | ) |
Removes a USB device filter from the specified position in the list of filters.
Positions are numbered starting from 0
. Specifying a position equal to or greater than the number of elements in the list will produce an error.
position | Position to remove the filter from. |
E_INVALIDARG | USB device filter list empty or invalid position. |
E_NOTIMPL
.void IHost::findHostDVDDrive | ( | in wstring | name, |
[retval] out IMedium | drive | ||
) |
Searches for a host DVD drive with the given name
.
name | Name of the host drive to search for |
drive | Found host drive object |
VBOX_E_OBJECT_NOT_FOUND | Given name does not correspond to any host drive. |
void IHost::findHostFloppyDrive | ( | in wstring | name, |
[retval] out IMedium | drive | ||
) |
Searches for a host floppy drive with the given name
.
name | Name of the host floppy drive to search for |
drive | Found host floppy drive object |
VBOX_E_OBJECT_NOT_FOUND | Given name does not correspond to any host floppy drive. |
void IHost::findHostNetworkInterfaceByName | ( | in wstring | name, |
[retval] out IHostNetworkInterface | networkInterface | ||
) |
Searches through all host network interfaces for an interface with the given name
.
name | Name of the host network interface to search for. |
networkInterface | Found host network interface object. |
name
does not correspond to any host network interface. void IHost::findHostNetworkInterfaceById | ( | in wstringUUID | id, |
[retval] out IHostNetworkInterface | networkInterface | ||
) |
Searches through all host network interfaces for an interface with the given GUID.
id | GUID of the host network interface to search for. |
networkInterface | Found host network interface object. |
void IHost::findHostNetworkInterfacesOfType | ( | in HostNetworkInterfaceType | type, |
[retval] out IHostNetworkInterface[] | networkInterfaces | ||
) |
Searches through all host network interfaces and returns a list of interfaces of the specified type.
type | type of the host network interfaces to search for. |
networkInterfaces | Found host network interface objects. |
void IHost::findUSBDeviceById | ( | in wstringUUID | id, |
[retval] out IHostUSBDevice | device | ||
) |
Searches for a USB device with the given UUID.
id | UUID of the USB device to search for. |
device | Found USB device object. |
VBOX_E_OBJECT_NOT_FOUND | Given id does not correspond to any USB device. |
void IHost::findUSBDeviceByAddress | ( | in wstring | name, |
[retval] out IHostUSBDevice | device | ||
) |
Searches for a USB device with the given host address.
name | Address of the USB device (as assigned by the host) to search for. |
device | Found USB device object. |
VBOX_E_OBJECT_NOT_FOUND | Given name does not correspond to any USB device. |
void IHost::generateMACAddress | ( | [retval] out wstring | address | ) |
Generates a valid Ethernet MAC address, 12 hexadecimal characters.
address | New Ethernet MAC address. |
void IHost::addUSBDeviceSource | ( | in wstring | backend, |
in wstring | id, | ||
in wstring | address, | ||
in wstring[] | propertyNames, | ||
in wstring[] | propertyValues | ||
) |
Adds a new USB device source.
backend | The backend to use as the new device source. |
id | Unique ID to identify the source. |
address | Address to use, the format is dependent on the backend. For USB/IP backends for example the notation is host[:port]. |
propertyNames | Array of property names for more detailed configuration. Not used at the moment. |
propertyValues | Array of property values for more detailed configuration. Not used at the moment. |
void IHost::removeUSBDeviceSource | ( | in wstring | id | ) |
Removes a previously added USB device source.
id | The identifier used when the source was added. |
void IHost::isExecutionEngineSupported | ( | in CPUArchitecture | cpuArchitecture, |
in VMExecutionEngine | executionEngine, | ||
[retval] out boolean | isSupported | ||
) |
Returns whether the given execution engine is supported on the host.
This is primarily to check whether the native API is supported (think of Hyper-V not being available due to not running in a Hyper-V root partition).
cpuArchitecture | The guest CPU architecture to check the execution engine for. |
executionEngine | The execution engine to check. |
isSupported | Flag indicating whether the given execution engine is supported on the host. |
readonly attribute PlatformArchitecture IHost::architecture |
Platform architecture type.
readonly attribute IHostX86 IHost::x86 |
Associated object for x86 host specifics.
readonly attribute IMedium [] IHost::DVDDrives |
List of DVD drives available on the host.
readonly attribute IMedium [] IHost::floppyDrives |
List of floppy drives available on the host.
readonly attribute IHostAudioDevice [] IHost::audioDevices |
List of audio devices currently available on the host.
E_NOTIMPL | This attribute is not implemented yet. |
readonly attribute IHostUSBDevice [] IHost::USBDevices |
List of USB devices currently attached to the host.
Once a new device is physically attached to the host computer, it appears in this list and remains there until detached.
E_NOTIMPL
. readonly attribute IHostUSBDeviceFilter [] IHost::USBDeviceFilters |
List of USB device filters in action.
When a new device is physically attached to the host computer, filters from this list are applied to it (in order they are stored in the list). The first matched filter will determine the action performed on the device.
Unless the device is ignored by these filters, filters of all currently running virtual machines (IUSBDeviceFilters::deviceFilters) are applied to it.
E_NOTIMPL
.readonly attribute IHostNetworkInterface [] IHost::networkInterfaces |
List of host network interfaces currently defined on the host.
readonly attribute wstring [] IHost::nameServers |
The list of nameservers registered in host's name resolving system.
readonly attribute wstring IHost::domainName |
Domain name used for name resolving.
readonly attribute wstring [] IHost::searchStrings |
Search string registered for name resolving.
readonly attribute unsigned long IHost::processorCount |
Number of (logical) CPUs installed in the host system.
readonly attribute unsigned long IHost::processorOnlineCount |
Number of (logical) CPUs online in the host system.
readonly attribute unsigned long IHost::processorCoreCount |
Number of physical processor cores installed in the host system.
readonly attribute unsigned long IHost::processorOnlineCoreCount |
Number of physical processor cores online in the host system.
readonly attribute IHostDrive [] IHost::hostDrives |
List of the host drive available to use in the VirtualBox.
readonly attribute unsigned long IHost::memorySize |
Amount of system memory in megabytes installed in the host system.
readonly attribute unsigned long IHost::memoryAvailable |
Available system memory in the host system.
readonly attribute wstring IHost::operatingSystem |
Name of the host system's operating system.
readonly attribute wstring IHost::OSVersion |
Host operating system's version string.
readonly attribute long long IHost::UTCTime |
Returns the current host time in milliseconds since 1970-01-01 UTC.
readonly attribute IHostVideoInputDevice [] IHost::videoInputDevices |
List of currently available host video capture devices.
readonly attribute IUpdateAgent IHost::updateHost |
Checks for new VirtualBox host versions.
readonly attribute IUpdateAgent IHost::updateExtPack |
Checks for new VirtualBox Extension Pack versions.
readonly attribute IUpdateAgent IHost::updateGuestAdditions |
Checks for new Guest Additions versions.