Internships/ProjectIdeas/VhostUserBlkDeviceBackend: Difference between revisions
(Created page with "=== 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 conn...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 15: | Line 15: | ||
'''Links:''' | '''Links:''' | ||
* [https://git.qemu.org/?p=qemu.git;a=blob;f=contrib/ | * [https://git.qemu.org/?p=qemu.git;a=blob;f=contrib/libvhost-user/libvhost-user.h;h=4aa55b4d2d88b7a0125e1f0e2a2f8047821c8a53;hb=HEAD libvhost-user] | ||
* [https://git.qemu.org/?p=qemu.git;a=blob;f=contrib/vhost-user-blk/vhost-user-blk.c;h=858221ad95c972be3155e7d625f9d11f54d730dd;hb=HEAD vhost-user-blk.c stand-alone example] | * [https://git.qemu.org/?p=qemu.git;a=blob;f=contrib/vhost-user-blk/vhost-user-blk.c;h=858221ad95c972be3155e7d625f9d11f54d730dd;hb=HEAD vhost-user-blk.c stand-alone example] | ||
* [https://git.qemu.org/?p=qemu.git;a=blob;f=docs/interop/vhost-user.txt;h=c2194711d9392bd02c2f332e585cf3c9978af063;hb=HEAD vhost-user protocol] | |||
'''Details:''' | '''Details:''' | ||
* Skill level: intermediate | * Skill level: intermediate | ||
* Language: C | * Language: C | ||
* Mentor: Stefan Hajnoczi <stefanha@redhat.com> ("stefanha" on IRC) | * Mentor: Kevin Wolf <kwolf@redhat.com> ("kwolf" on IRC), Stefan Hajnoczi <stefanha@redhat.com> ("stefanha" on IRC) |
Latest revision as of 07:49, 11 March 2019
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
Links:
Details:
- Skill level: intermediate
- Language: C
- Mentor: Kevin Wolf <kwolf@redhat.com> ("kwolf" on IRC), Stefan Hajnoczi <stefanha@redhat.com> ("stefanha" on IRC)