VirtualBox Main API

Public Attributes | List of all members
IStorageController Interface Reference

Represents a storage controller that is attached to a virtual machine (IMachine). More...

Inheritance diagram for IStorageController:

## Public Attributes
attribute wstring | name
| Name of the storage controller, as originally specified with IMachine::addStorageController.
readonly attribute unsigned long | maxDevicesPerPortCount
| Maximum number of devices which can be attached to one port.
readonly attribute unsigned long | minPortCount
| Minimum number of ports that IStorageController::portCount can be set to.
readonly attribute unsigned long | maxPortCount
| Maximum number of ports that IStorageController::portCount can be set to.
attribute unsigned long | instance
| The instance number of the device in the running VM.
attribute unsigned long | portCount
| The number of currently usable ports on the controller.
readonly attribute StorageBus | bus
| The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
attribute StorageControllerType | controllerType
| The exact variant of storage controller hardware presented to the guest.
attribute boolean | useHostIOCache
| If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O caches and use synchronous file APIs on the host.
readonly attribute boolean | bootable
| Returns whether it is possible to boot from disks attached to this controller.

## Detailed Description

Represents a storage controller that is attached to a virtual machine (IMachine).

Just as drives (hard disks, DVDs, FDs) are attached to storage controllers in a real computer, virtual drives (represented by IMediumAttachment) are attached to virtual storage controllers, represented by this interface.

As opposed to physical hardware, VirtualBox has a very generic concept of a storage controller, and for purposes of the Main API, all virtual storage is attached to virtual machines via instances of this interface. There are five types of such virtual storage controllers: IDE, SCSI, SATA, SAS and Floppy (see bus). Depending on which of these four is used, certain sub-types may be available and can be selected in controllerType.

Depending on these settings, the guest operating system might see significantly different virtual hardware.

Interface ID:
  `{DDCA7247-BF98-47FB-AB2F-B5177533F493}`

## Member Data Documentation

## ◆ name

attribute wstring IStorageController::name

Name of the storage controller, as originally specified with IMachine::addStorageController.

This then uniquely identifies this controller with other method calls such as IMachine::attachDevice and IMachine::mountMedium.

## ◆ maxDevicesPerPortCount

readonly attribute unsigned long IStorageController::maxDevicesPerPortCount

Maximum number of devices which can be attached to one port.

## ◆ minPortCount

readonly attribute unsigned long IStorageController::minPortCount

Minimum number of ports that IStorageController::portCount can be set to.

## ◆ maxPortCount

readonly attribute unsigned long IStorageController::maxPortCount

Maximum number of ports that IStorageController::portCount can be set to.

## ◆ instance

attribute unsigned long IStorageController::instance

The instance number of the device in the running VM.

## ◆ portCount

attribute unsigned long IStorageController::portCount

The number of currently usable ports on the controller.

The minimum and maximum number of ports for one controller are stored in IStorageController::minPortCount and IStorageController::maxPortCount.

## ◆ bus

readonly attribute StorageBus IStorageController::bus

The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).

## ◆ controllerType

attribute StorageControllerType IStorageController::controllerType

The exact variant of storage controller hardware presented to the guest.

Depending on this value, VirtualBox will provide a different virtual storage controller hardware to the guest. For SATA, SAS and floppy controllers, only one variant is available, but for IDE and SCSI, there are several.

For SCSI controllers, the default type is LsiLogic.

## ◆ useHostIOCache

attribute boolean IStorageController::useHostIOCache

If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O caches and use synchronous file APIs on the host.

This was the only option in the API before VirtualBox 3.2 and is still the default for IDE controllers.

If false, the host I/O cache will be disabled for image files attached to this storage controller. Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes it possible to turn off the host I/O caches because the emulation can handle unaligned access to the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many virtual machines are running at the same time to prevent I/O cache related hangs. This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.

## ◆ bootable

readonly attribute boolean IStorageController::bootable

Returns whether it is possible to boot from disks attached to this controller.