Conference Schedule - BSDCan 2020

Improving block I/O compatibility in bhyve

Date: 2020-06-05
Time: 09:15 - 10:00
Room: Stream 2
Level: Intermediate

All times are based on Ottawa time, which is UTC -4. For example, 9AM is 1300 UTC.

As part of providing a robust virtual machine infrastructure, a hypervisor needs to offer a variety of features for working with disk input/output operations, since these are essential for running most operating systems.

In this presentation, I detail the steps taken in developing, debugging, and evaluating the interface provided by the bhyve hypervrisor for using image disk files.

For this I have been working together with Marcel Molenaar on libvdsk libvdsk-github [1], a library that can be used by bhyve in order to add support for more disk types for virtual machines. As bhyve's popularity increases, users demand support for more features, and more complex image file formats is one of them. This comes from the fact that bhyve can only use RAW disk files, which act like real disks. Other formats include more features such as compression, encryption or disk snapshots.

libvdsk works by offering an API that can be used by any program that can link with it. It implements file operations for different types of image files. This will make it so that depending on the type of file the virtual machine uses as a disk file, libvdsk will run different file operations in the backend, depending on the type.

I have chosen to implement support for QCOW2 as it will help my colleagues in the implementation of a fully rounded virtual machine snapshot feature [2], because QCOW2 offers support for snapshotting the disk state in an efficient way.

I have implemented support for the QCOW2 image file format by adding it to the libvdsk library, an API meant as an universal open-source framework which can be linked to by any applications, such as the bhyve hypervisor does. In this project I have also added support for the copy-on-write functionality, which will allow for more use cases for hypervisor in Infrastructure as a Service jobs, and it will pave the way for a full and comprehensive virtual machine save and restore functionality.

[1] [2]


Sergiu Weisz