block: add read-only VMDK disk image support#5741
Conversation
|
@ChengyuZhu6 what prevents this as a draft? |
|
Hi @ChengyuZhu6, unfortunately we don't have enough bandwidth to review this for now. |
@ShadowCurse I guess this one is not complicated and it seems almost half the change is test cases. Also I guess the commit message should be improved to make the usage clear at least. |
|
Hey @hsiangkao, @ChengyuZhu6, first of all, thank you very much for the contribution! I think this is a very promising solution for container workloads. Do you have any examples on how this would integrate with containerd? However, we take every new feature very seriously and we need to undergo an internal security review for every new feature, which means that despite the change itself being small, it requires a non-trivial amount of time from our side that we don't have at the moment. In any case, having a very quick look at the PR:
|
Hi @Manciukic, thank you very much for the reply! currently I don't have some free slot to run an end-to-end example using containerd + kata-containers + firecracker, but I will find (or I hope @ChengyuZhu6 could finish the pull request message at least) time to run an e2e later. but the story is much similar to what we did for nerdbox + libkrun: and my final interest is that to apply VMDK to virtio-pmem as well so that each backing file can be passthrough into guests and shared in a finer way: of course, virtio-pmem could bring some security concern, but depends on the workload, it could also be useful if memory sharing is not an issue.
I will defer this question to @ChengyuZhu6 .
yes, imago has published on crates.io with qcow2 and this limited vmdk support. |
2d5fc9b to
726beb2
Compare
Good catch. I removed the direct |
Agreed. I switched imago from |
Introduce read-only VMDK (monolithicFlat) support using the imago library. Signed-off-by: Chengyu Zhu <hudsonzhu@tencent.com>
|
@ChengyuZhu6 @ShadowCurse @Manciukic could we consider enabling qcow2 using imago too? |
I think this is a good idea. I suggest including it in the following PR, since it would make review easier. |
This change adds read-only VMDK support to the virtio-block path, and the primary motivation is the EROFS fsmerge scenario described in containerd/nerdbox#30. In that workflow, multiple layer blobs are referenced through one VMDK descriptor, so the guest can consume them as one logical block device instead of attaching many devices.
Why this is needed:
The main driver is the EROFS fsmerge workflow (see containerd/nerdbox#30). In that setup, many layer blobs are referenced by a small metadata image. For VM-based runtimes, attaching one block device per layer does not scale well.
What is included in this patch:
This patch adds read-only VMDK support so those layers can be presented as one logical disk through a standard descriptor format. That removes the need to pass a large number of block devices or add an extra image conversion step before boot.
How this solves the problem:
Changes
...
Reason
...
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.PR Checklist
tools/devtool checkbuild --allto verify that the PR passesbuild checks on all supported architectures.
tools/devtool checkstyleto verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md.Runbook for Firecracker API changes.
integration tests.
TODO.rust-vmm.