vdev virtio-blk
Provide the standard VIRTIO interface for block devices
Synopsis:
vdev virtio-blk options
Options:
- delayed seconds|forever
- If specified, delay opening the device in the host until it is first referenced by the guest.
- dio enable|disable
- Configure the use of Direct I/O when processing the guest's requests.
The enable setting activates it for both read and write requests.
The default setting is
disable, meaning Direct I/O is not used by default.
If a Direct I/O access fails at any point (either because it's not supported by the back-end driver or for any other reason), the device will permanently switch back to using _IO_READ and _IO_WRITE messages.
- hostdev [<]host_filename
- Provide the name of the host file to use for the contents of the device.
- intr intr
- Signal intr for device interrupts. Not required when the vdev appears as a PCI device.
- legacy
- Provide the VIRTIO legacy interface (0.9.5) rather than the 1.0 or later standard versions.
- loc addr
- Set the base address of the device registers to addr. Not required if the vdev appears as a PCI device.
- threads number
- Set the number of threads for processing requests. This number must be
at most 32, and will be truncated to the maximum that the back-end device
actually supports, if the device has a thread limit smaller than 32.
Note:
For better performance, we recommend using a number of threads that is based on the configuration of your hypervisor host system. If the system is single-core, use just one thread. If it's quad-core, for optimal performance, use between two and four threads.
For multi-threading to work properly, the guest must support multi-threaded operation through its VIRTIO driver, and the back-end device (i.e., the vdev) must also support multi-threaded operation. To complete a multi-threaded request, if a hardware device (e.g., eMMC) is controlled by a back-end device (in the hypervisor host domain) then the hardware also must support multi-threading and this must be enabled by the device. If any part of this chain is not multi-threaded then single-threading may occur and less efficiency will be gained.
For a list of options available to all vdevs, see Common vdev options
at the beginning of this chapter.
Description:
ARM and x86. The virtio-blk vdev provides an interface for block devices (e.g., SATA drives). Normally this device appears as a PCI device, but if you specify the loc and intr options, the guest will see it as a memory-mapped I/O device at the specified location.
For virtio-blk, packed virtqueues are enabled if the guest supports them.
