org.virtualbox_4_1
Class IStorageController

java.lang.Object
  extended by org.virtualbox_4_1.IUnknown
      extended by org.virtualbox_4_1.IStorageController

public class IStorageController
extends IUnknown

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 getBus()). Depending on which of these four is used, certain sub-types may be available and can be selected in getControllerType(). Depending on these settings, the guest operating system might see significantly different virtual hardware. Interface ID: {A1556333-09B6-46D9-BFB7-FC239B7FBE1E}


Field Summary
 
Fields inherited from class org.virtualbox_4_1.IUnknown
obj, port
 
Constructor Summary
IStorageController(java.lang.String wrapped, org.virtualbox_4_1.jaxws.VboxPortType port)
           
 
Method Summary
 java.lang.Boolean getBootable()
          Returns whether it is possible to boot from disks attached to this controller.
 StorageBus getBus()
          The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
 StorageControllerType getControllerType()
          The exact variant of storage controller hardware presented to the guest.
 java.lang.Integer getIDEEmulationPort(java.lang.Integer devicePosition)
          Gets the corresponding port number which is emulated as an IDE device.
 java.lang.Long getInstance()
          The instance number of the device in the running VM.
 java.lang.Long getMaxDevicesPerPortCount()
          Maximum number of devices which can be attached to one port.
 java.lang.Long getMaxPortCount()
          Maximum number of ports that getPortCount() can be set to.
 java.lang.Long getMinPortCount()
          Minimum number of ports that getPortCount() can be set to.
 java.lang.String getName()
          Name of the storage controller, as originally specified with IMachine.addStorageController(String,org.virtualbox_4_1.StorageBus).
 java.lang.Long getPortCount()
          The number of currently usable ports on the controller.
 java.lang.Boolean getUseHostIOCache()
          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.
static IStorageController queryInterface(IUnknown obj)
           
 void setControllerType(StorageControllerType value)
          The exact variant of storage controller hardware presented to the guest.
 void setIDEEmulationPort(java.lang.Integer devicePosition, java.lang.Integer portNumber)
          Sets the port number which is emulated as an IDE device.
 void setInstance(java.lang.Long value)
          The instance number of the device in the running VM.
 void setPortCount(java.lang.Long value)
          The number of currently usable ports on the controller.
 void setUseHostIOCache(java.lang.Boolean value)
          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.
 
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

IStorageController

public IStorageController(java.lang.String wrapped,
                          org.virtualbox_4_1.jaxws.VboxPortType port)
Method Detail

getName

public java.lang.String getName()
Name of the storage controller, as originally specified with IMachine.addStorageController(String,org.virtualbox_4_1.StorageBus). This then uniquely identifies this controller with other method calls such as IMachine.attachDevice(String,Integer,Integer,org.virtualbox_4_1.DeviceType,org.virtualbox_4_1.IMedium) and IMachine.mountMedium(String,Integer,Integer,org.virtualbox_4_1.IMedium,Boolean).

Returns:
String

getMaxDevicesPerPortCount

public java.lang.Long getMaxDevicesPerPortCount()
Maximum number of devices which can be attached to one port.

Returns:
Long

getMinPortCount

public java.lang.Long getMinPortCount()
Minimum number of ports that getPortCount() can be set to.

Returns:
Long

getMaxPortCount

public java.lang.Long getMaxPortCount()
Maximum number of ports that getPortCount() can be set to.

Returns:
Long

getInstance

public java.lang.Long getInstance()
The instance number of the device in the running VM.

Returns:
Long

setInstance

public void setInstance(java.lang.Long value)
The instance number of the device in the running VM.

Parameters:
value - Long

getPortCount

public java.lang.Long getPortCount()
The number of currently usable ports on the controller. The minimum and maximum number of ports for one controller are stored in getMinPortCount() and getMaxPortCount().

Returns:
Long

setPortCount

public void setPortCount(java.lang.Long value)
The number of currently usable ports on the controller. The minimum and maximum number of ports for one controller are stored in getMinPortCount() and getMaxPortCount().

Parameters:
value - Long

getBus

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

Returns:
org.virtualbox_4_1.StorageBus

getControllerType

public StorageControllerType getControllerType()
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.

Returns:
org.virtualbox_4_1.StorageControllerType

setControllerType

public void setControllerType(StorageControllerType value)
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.

Parameters:
value - org.virtualbox_4_1.StorageControllerType

getUseHostIOCache

public java.lang.Boolean getUseHostIOCache()
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.

Returns:
Boolean

setUseHostIOCache

public void setUseHostIOCache(java.lang.Boolean value)
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.

Parameters:
value - Boolean

getBootable

public java.lang.Boolean getBootable()
Returns whether it is possible to boot from disks attached to this controller.

Returns:
Boolean

queryInterface

public static IStorageController queryInterface(IUnknown obj)

getIDEEmulationPort

public java.lang.Integer getIDEEmulationPort(java.lang.Integer devicePosition)
Gets the corresponding port number which is emulated as an IDE device. Works only with SATA controllers. Expected result codes:
E_INVALIDARG The devicePosition is not in the range 0 to 3.
E_NOTIMPL The storage controller type is not SATAIntelAhci.


setIDEEmulationPort

public void setIDEEmulationPort(java.lang.Integer devicePosition,
                                java.lang.Integer portNumber)
Sets the port number which is emulated as an IDE device. Works only with SATA controllers. Expected result codes:
E_INVALIDARG The devicePosition is not in the range 0 to 3 or the portNumber is not in the range 0 to 29.
E_NOTIMPL The storage controller type is not SATAIntelAhci.