Primarily for compatibility with other virtualization software, Oracle VM VirtualBox optionally supports LSI Logic and BusLogic SCSI controllers, to each of which up to fifteen virtual hard disks can be attached.
In a computing device, 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 most common types of hard disk controllers typically found in computing devices: IDE, SATA (AHCI), SCSI, SAS, USB-based, and NVMe mass storage devices.
- To execute SCSI commands, a target driver must first allocate a scsipkt(9S) structure for the command. The target driver must then specify its own private data area length, the command status, and the command length.
- Because i need use a scsi controller, not a sata controller. My task to export vm in ova format to esx. This ova format must work both in virtual box and esx. As we know, esx doesn't support sata controller. Please help me solve my proble with discovering scsi drivers. I can't find appropriate drivers in internet.
- Modify the sd.conf file (in the /kernel/drv/ directory) to inform the Solaris operating system about the new SCSI target device and LUNs. For example, if you had four LUNs, you would add lines similar to the following example lines.
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 more recent standard than IDE. 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.
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 versions before Windows Vista. Legacy Windows versions such as Windows XP, even with SP3 installed, 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.18, “VBoxManage storagectl”.
SCSI is another established industry standard, standing for Small Computer System Interface. SCSI is as a generic interface for data transfer between all kinds of devices, including storage devices. SCSI is still used for connecting some 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 fifteen 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.
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 physical devices, serial cables are used instead of parallel cables. This 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.
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 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.
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 for connecting non volatile memory (NVM) directly over PCI Express to lift the bandwidth limitation of the previously used SATA protocol for solid-state devices. Unlike other standards the command set is very simple in order 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.
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.
Copyright © 2004, 2020 Oracle and/or its affiliates. All rights reserved. Legal Notices
Most of them are outdated, but provide historical design context.
They are not user documentation and should not be treated as such.
Documentation is available here.
Summary
The virtio-scsi feature is a new para-virtualized SCSI controller device. It is the foundation of an alternative storage implementation for KVM Virtualization’s storage stack replacing virtio-blk and improving upon its capabilities. It provides the same performance as virtio-blk, and adds the following immediate benefits:
- Improved scalability—virtual machines can connect to more storage devices (the virtio-scsi can handle multiple block devices per virtual SCSI adapter).
- Standard command set—virtio-scsi uses standard SCSI command sets, simplifying new feature addition.
- Standard device naming—virtio-scsi disks use the same paths as a bare-metal system. This simplifies physical-to-virtual and virtual-to-virtual migration.
- SCSI device passthrough—virtio-scsi can present physical storage devices directly to guests.
Virtio-SCSI provides the ability to connect directly to SCSI LUNs and significantly improves scalability compared to virtio-blk. The advantage of virtio-SCSI is that it is capable of handling hundreds of devices compared to virtio-blk which can only handle approximately 30 devices and exhausts PCI slots.
Designed to replace virtio-blk, virtio-scsi retains virtio-blk’s performance advantages while improving storage scalability, allowing access to multiple storage devices through a single controller, and enabling reuse of the guest operating system’s SCSI stack.
Owner
- Name: Daniel Erez (Derez)
- Email: derez@redhat.com
Current status
- Target Release: 3.3
- Status: released
Detailed Description
The virtio SCSI host is the basis of an alternative storage stack for KVM. This stack would overcome several limitations of the current solution, virtio-blk:
1) scalability limitations: virtio-blk-over-PCI puts a strong upper limit on the number of devices that can be added to a guest. Currently virtio-blk imposes a limitation of ~30 disks per guest. Each virtio-blk virtual adapter can only handle one block device so the number of block devices is limited by the number of virtual PCI slots in the guest. While this can be worked around by implementing a PCI-to-PCI bridge, or by using multifunction virtio-blk devices, these solutions either have not been implemented yet, or introduce management restrictions. On the other hand, the SCSI architecture is well known for its scalability and virtio-scsi supports advanced feature such as multiqueueing.
2) limited flexibility: virtio-blk does not support all possible storage scenarios. For example, it does not allow SCSI passthrough or persistent reservations. In principle, virtio-scsi provides anything that the underlying SCSI target (be it physical storage, iSCSI or the in-kernel target) supports.
3) limited extensibility: over the time, many features have been added to virtio-blk. Each such change requires modifications to the virtio specification, to the guest drivers, and to the device model in the host. The virtio-scsi spec has been written to follow SAM conventions, and exposing new features to the guest will only require changes to the host’s SCSI target implementation.
Guest Support
The following Guest OS drivers are available:
- Fedora / Other Linuxes
- Windows Server 2003 / 2007 / 2008 / 2012, Windows 7/8
- Windows XP is not supported
Note: Windows drivers should be added to guest tools.
VDSM
Adding an image Disk
Adding a DirectLUN Disk (lun passthrough)
Backend
- DiskInterface enum: VirtIO_SCSI
- Affected commands: AddDisk/UpdateVmDisk/HotPlugDisk
- ‘VirtIOScsiEnabled’ configuration value.
- BaseDisk: sgio field.
- VmInfoBuilder:
- Add “scsi” interface to struct.
- Add “virto-scsi” controller.
- Add ‘sgio’ propety to device.
- Permissions:
- CONFIGURE_SCSI_GENERIC_IO ActionGroup
- Check on Disk entity
- Add to SuperUser/DataCenterAdmin roles
- VirtIO-SCSI enabled flag:
- When enabled, a VirtIO-SCSI controller device is added to vm_device table.
- Used for maintaining stable address to the pci controller.
- Necessary for hot-plugging a disk with VirtIO-SCSI interface.
- The flag is defaulted to true on cluster >= 3.3.
REST-API
Create/Update an image Disk
Create/Update a DirectLUN Disk
VirtIO_SCSI flag
UI
Add Disk
New Role
New/Edit VM
Sequence diagram
Benefit to oVirt
Virtio-SCSI will add the following abilities to oVirt:
Drivers Oracle Scsi & Raid Devices List
- Allow the usage of hundreds of devices per guest
- Attach a virtual hard drive or CD through the virtio-scsi controller
- pass-through a physical SCSI device from the host to the guest via the QEMU scsi-block device
Dependencies / Related Features and Projects
- virtio-scsi ioctl
Testing
- Run all tests on disks with the new disk interface (Virtio-SCSI).
- Hot-Plug: at the moment, hot plug would succeed only if there’s already at least one virtio-scsi disk (i.e. a scsi controller should be available on running vm).
- SGIO: for DirectLUN disks, check that ‘sgio’ property is passed correctly (filtered/unfiltered).
- MLA: Disk -> ‘Manipulate SCSI I/O Privilages’.
Documentation / External references
- virtio-scsi Fedora feature page [KVM]: http://fedoraproject.org/wiki/Features/virtio-scsi
- virtio scsi host draft specification, v3 [QEMU]: http://lists.gnu.org/archive/html/qemu-devel/2011-06/msg00754.html
- virtio scsi libvirt: http://libvirt.org/formatdomain.html#elementsControllers
- There are a number of use cases where the virtual machine would need to run SG_IO commands that are considered ‘dangerous’ such as persistent reservations.
- Today the kernel blocks commands unless the calling application has CAP_SYS_RAWIO.
- Giving this facility to the qemu process (or run as root) raises a number of security concerns.
- Consider to define a certain set of commands upfront - such as persistent reservations, TRIM/DISCARD, etc however since storage vendors can define their own commands this may not be enough.
- A filter mechanism is need to be able to define filters for SG_IO commands to allow an administrator to define what privileged commands should be permitted for a given process.
This should not require the process to run as root.
Filtered vs. unfiltered sg commands (i.e. the mechanism is currently all or nothing – can’t filter specific commands).
- Mapping of disk vs. lun in libvirt to disk image and direct lun appropriately.
- The feature is enabled for cluster 3.3 and up.
Open Issues
- How to use virtio-scsi controllers:
- One SCSI controller for all disks? Or, a SCSI controller per disk?
- Note: Each device on a virtio-scsi controller is represented as a logical unit, or LUN. The LUNs are grouped into targets. Each device can have a maximum of 256 targets per controller and 16,384 logical units per target.
- One SCSI controller for all disks? Or, a SCSI controller per disk?
- How hot-plug is affected:
- Hot-plugging a disk with virtio-scsi interface should attach a new controller? Or, reuse the current SCSI controller?
- Assume that a controller already exists in the VM?
- Or, how to verify that a controller already exists in the VM (try/catch or using virDomainGetXMLDesc)?
- Hot-unplugging a disk should remove the controller as well? (currently, not supported by libvirt)
- Hot-plugging a disk with virtio-scsi interface should attach a new controller? Or, reuse the current SCSI controller?
- Should virtio-scsi be set as default for 3.3 clusters?
Drivers Oracle Scsi & Raid Devices Download
Future Work
Drivers Oracle Scsi & Raid Devices Usb
- Decouple disk interface (IDE/Virtio/Virtio-scsi) from Disk entity. I.e. disk interface should be defined in the connection between disk and VM (vm device), as opposed to the current situation whereas disk interface is a property of the disk.
- Support CDs as well.