Replies: 2 comments
-
|
Fwiw, I've used qemu storage daemon to connect cloud hypervisor to Ceph RBDs. So from that standpoint it's pretty useful and could be good to at least document the capability. If going the separate rust storage daemon route, it'd be nice to keep use cases like that in mind. |
Beta Was this translation helpful? Give feedback.
-
|
Some of our users want to use QEMU backing file and compression support with Cloud Hypervisor. That doesn't mean it has to be done in-process though. Running QEMU code in production is a no-go for some of our use cases. Perhaps we can reorganize Cloud Hypervisor's code to achieve the same result as QEMU's storage daemon. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
QEMU includes the QEMU Storage Daemon. This provides more features than Cloud Hypervisor’s own block layer. It also includes a vhost-user server, which allows Cloud Hypervisor to delegate block operations to it.
QEMU Storage Daemon is written in C, but as it only performs block I/O it should be possible to isolate it in an extremely tight sandbox. Furthermore, a vulnerability in QEMU’s block code itself (as opposed to the daemon) would make enough of a splash that it isn’t going to go unnoticed. The daemon is (presumably) a thin wrapper over this code. QEMU’s block code is even secure against malicious qcow2 images, so long as backing files are not in use or the backing file name is not attacker-controlled. OpenStack relies on this.
While a native and efficient raw backend is definitely worthwhile, the value add of supporting non-raw images natively is less obvious. Non-raw images add a lot of complexity. As the reference implementation of qcow2, QEMU supports more features (such as encryption) and has additional runtime checks to prevent corruption.
Even if the risk of QEMU Storage Daemon is too high, another option would be to create a vhost-user-blk server under the rust-vmm organization. This could be used by multiple VMMs, including Cloud Hypervisor, Firecracker, and even QEMU.
Furthermore, @rbradford has recommended moving the qcow2 code out of process. Using vhost-user accomplishes this goal automatically.
Beta Was this translation helpful? Give feedback.
All reactions