5.1. Hard Disk Controllers: IDE, SATA (AHCI), SCSI, SAS, USB MSD, NVMe

In a real PC, hard disks and CD/DVD drives are connected to a device called hard disk controller which drives hard disk operation and data transfers. Oracle VM VirtualBox can emulate the five most common types of hard disk controllers typically found in today's PCs: IDE, SATA (AHCI), SCSI, SAS, USB-based, and NVMe mass storage devices.

  • IDE (ATA) controllers are a backwards compatible yet very advanced extension of the disk controller in the IBM PC/AT (1984). Initially, this interface worked only with hard disks, but was later extended to also support CD-ROM drives and other types of removable media. In physical PCs, this standard uses flat ribbon parallel cables with 40 or 80 wires. Each such cable can connect two devices to a controller, which have traditionally been called master and slave. Typical PCs had two connectors for such cables. As a result, support for up to four IDE devices was most common.

    In Oracle VM VirtualBox, each virtual machine may have one IDE controller enabled, which gives you up to four virtual storage devices that you can attach to the machine. By default, one of these virtual storage devices, the secondary master, is preconfigured to be the virtual machine's virtual CD/DVD drive. However, you can change the default setting.

    Even if your guest OS has no support for SCSI or SATA devices, it should always be able to see an IDE controller.

    You can also select which exact type of IDE controller hardware Oracle VM VirtualBox should present to the virtual machine: PIIX3, PIIX4, or ICH6. This makes no difference in terms of performance, but if you import a virtual machine from another virtualization product, the OS in that machine may expect a particular controller type and crash if it is not found.

    After you have created a new virtual machine with the New Virtual Machine wizard of the graphical user interface, you will typically see one IDE controller in the machine's Storage settings. The virtual CD/DVD drive will be attached to one of the four ports of this controller.

  • Serial ATA (SATA) is a newer standard introduced in 2003. Compared to IDE, it supports both much higher speeds and more devices per controller. Also, with physical hardware, devices can be added and removed while the system is running. The standard interface for SATA controllers is called Advanced Host Controller Interface (AHCI).

    Like a real SATA controller, Oracle VM VirtualBox's virtual SATA controller operates faster and also consumes fewer CPU resources than the virtual IDE controller. Also, this enables you to connect up to 30 virtual hard disks to one machine instead of just three, when compared to the Oracle VM VirtualBox IDE controller with a DVD drive attached.

    For this reason, depending on the selected guest OS, Oracle VM VirtualBox uses SATA as the default for newly created virtual machines. One virtual SATA controller is created by default, and the default disk that is created with a new VM is attached to this controller.

    Warning

    The entire SATA controller and the virtual disks attached to it, including those in IDE compatibility mode, will not be seen by OSes that do not have device support for AHCI. In particular, there is no support for AHCI in Windows before Windows Vista. So Windows XP, even SP3, will not see such disks unless you install additional drivers. It is possible to switch from IDE to SATA after installation by installing the SATA drivers and changing the controller type in the VM Settings dialog.

    Oracle VM VirtualBox recommends the Intel Matrix Storage drivers, which can be downloaded from http://downloadcenter.intel.com/Product_Filter.aspx?ProductID=2101.

    To add a SATA controller to a machine for which it has not been enabled by default, either because it was created by an earlier version of Oracle VM VirtualBox, or because SATA is not supported by default by the selected guest OS, do the following. Go to the Storage page of the machine's Settings dialog, click Add Controller under the Storage Tree box and then select Add SATA Controller. The new controller appears as a separate PCI device in the virtual machine, and you can add virtual disks to it.

    To change the IDE compatibility mode settings for the SATA controller, see Section 7.20, “VBoxManage storagectl”.

  • SCSI is another established industry standard, standing for Small Computer System Interface. SCSI was standardized as early as 1986 as a generic interface for data transfer between all kinds of devices, including storage devices. Today SCSI is still used for connecting hard disks and tape devices, but it has mostly been displaced in commodity hardware. It is still in common use in high-performance workstations and servers.

    Primarily for compatibility with other virtualization software, Oracle VM VirtualBox optionally supports LSI Logic and BusLogic SCSI controllers, to each of which up to 15 virtual hard disks can be attached.

    To enable a SCSI controller, on the Storage page of a virtual machine's Settings dialog, click Add Controller under the Storage Tree box and then select Add SCSI Controller. The new controller appears as a separate PCI device in the virtual machine.

    Warning

    As with the other controller types, a SCSI controller will only be seen by OSes with device support for it. Windows 2003 and later ships with drivers for the LSI Logic controller, while Windows NT 4.0 and Windows 2000 ships with drivers for the BusLogic controller. Windows XP ships with drivers for neither.

  • Serial Attached SCSI (SAS) is another bus standard which uses the SCSI command set. As opposed to SCSI, however, with physical devices, serial cables are used instead of parallel ones, which simplifies physical device connections. In some ways, therefore, SAS is to SCSI what SATA is to IDE: it enables more reliable and faster connections.

    To support high-end guests which require SAS controllers, Oracle VM VirtualBox emulates a LSI Logic SAS controller, which can be enabled much the same way as a SCSI controller. At this time, up to eight devices can be connected to the SAS controller.

    Warning

    As with SATA, the SAS controller will only be seen by OSes with device support for it. In particular, there is no support for SAS in Windows before Windows Vista. So Windows XP, even SP3, will not see such disks unless you install additional drivers.

  • The USB mass storage device class is a standard to connect external storage devices like hard disks or flash drives to a host through USB. All major OSes support these devices for a long time and ship generic drivers making third-party drivers superfluous. In particular, legacy OSes without support for SATA controllers may benefit from USB mass storage devices.

    The virtual USB storage controller offered by Oracle VM VirtualBox works differently to the other storage controller types. While most storage controllers appear as a single PCI device to the guest with multiple disks attached to it, the USB-based storage controller does not appear as virtual storage controller. Each disk attached to the controller appears as a dedicated USB device to the guest.

    Warning

    Booting from drives attached using USB is only supported when EFI is used as the BIOS lacks USB support.

  • Non volatile memory express (NVMe) is a standard which emerged in 2011 for connecting non volatile memory (NVM) directly over PCI express to lift the bandwidth limitation of the previously used SATA protocol for SSDs. Unlike other standards the command set is very simple to achieve maximum throughput and is not compatible with ATA or SCSI. OSes need to support NVMe devices to make use of them. For example, Windows 8.1 added native NVMe support. For Windows 7, native support was added with an update.

    The NVMe controller is part of the extension pack.

    Warning

    Booting from drives attached using NVMe is only supported when EFI is used as the BIOS lacks the appropriate driver.

In summary, Oracle VM VirtualBox gives you the following categories of virtual storage slots:

  • Four slots attached to the traditional IDE controller, which are always present. One of these is typically a virtual CD/DVD drive.

  • 30 slots attached to the SATA controller, if enabled and supported by the guest OS.

  • 15 slots attached to the SCSI controller, if enabled and supported by the guest OS.

  • Eight slots attached to the SAS controller, if enabled and supported by the guest OS.

  • Eight slots attached to the virtual USB controller, if enabled and supported by the guest OS.

  • Up to 255 slots attached to the NVMe controller, if enabled and supported by the guest OS.

Given this large choice of storage controllers, you may not know which one to choose. In general, you should avoid IDE unless it is the only controller supported by your guest. Whether you use SATA, SCSI, or SAS does not make any real difference. The variety of controllers is only supplied by Oracle VM VirtualBox for compatibility with existing hardware and other hypervisors.