Virtio block device (virtio-blk)
Virtio-blk is a paravirtualized block-device interface through which a guest submits storage requests to a virtual disk.
Interface: One virtio-blk device presents one disk; multiple queues do not make it a SCSI controller. Device features are distinct from the backend image format. [2] [3]
Persistence: Interpret write completion using negotiated flush and writeback settings; it is not an unconditional durability guarantee. Conversely, conforming writethrough configurations can require stability at completion. Switching writeback off does not by itself guarantee that older cached writes have become persistent. [1]
QEMU cache settings: cache=none enables direct host I/O, but retains the guest-device writeback setting and does not suppress flushes. cache=unsafe enables flush suppression; neither name changes the image format. [4]
Relations
Citations
- OASIS VIRTIO 1.2 CS01 (1 July 2022): sections 5.2 and 5.6
- QEMU: Configuring virtio-blk and virtio-scsi Devices (19 January 2021)
- QEMU: An Overview of QEMU Storage Features (14 September 2020)
- QEMU system documentation: cache.direct, cache.no-flush and -drive cache mode mapping
Further reading
Sources & caveats
- Documentation synthesis, not a VM benchmark, conformance test or power-loss experiment.
- VIRTIO 1.2 CS01 is the reviewed baseline, not a claim that it is the latest edition.