vhost-user-blk device backend
Summary: Implement a vhost-user-blk device backend inside QEMU so guests can efficiently access shared disk images.
QEMU can connect virtio-blk disks to external processes that act as vhost-user-blk device backends. This makes it possible for QEMU guests to access disks managed by SPDK or other software-defined storage appliances.
QEMU itself does not offer a vhost-user-blk device backend although the QEMU block layer has a number of features that make QEMU desirable as a software-defined storage appliance in its own right. For example, multiple VMs could safely access a shared qcow2 disk image file with one of the QEMUs acting as the vhost-user-blk device backend. Today this is can be worked around using QEMU's NBD support, but its performance will always be lower since it is a network protocol.
The goal is to add a vhost-user-blk device backend to QEMU so that disks can be exported to other processes. The following steps are necessary:
- Understand libvhost-user, QEMU's library for implementing vhost-user device backends
- Add a QEMU monitor command for instantiating vhost-user-blk device backends given a blockdev and a UNIX domain socket
- Add a QEMU monitor command for shutting down and removing vhost-user-blk device backends
- Implement a vhost-user-blk device backend using libvhost-user (see the vhost-user-blk.c stand-alone example below)
- Extend QEMU's vhost-user tests to take advantage of your vhost-user-blk device backend
- Skill level: intermediate
- Language: C
- Mentor: Kevin Wolf <firstname.lastname@example.org> ("kwolf" on IRC), Stefan Hajnoczi <email@example.com> ("stefanha" on IRC)