feat:support convert qcow2 img to overlaybd#407
Merged
Conversation
BigVan
reviewed
Jun 15, 2026
902145d to
1611bea
Compare
1611bea to
321a234
Compare
BigVan
reviewed
Jun 15, 2026
| app.add_option("--checksum", sha256_checksum, "sha256 checksum for origin uncompressed data"); | ||
| app.add_option("input_path", input_path, "input OCIv1 tar layer path")->type_name("FILEPATH")->check(CLI::ExistingFile)->required(); | ||
|
|
||
| app.add_option("input_path", input_path, "input OCIv1 tar layer path")->type_name("FILEPATH")->check(CLI::ExistingFile); |
| const auto &cm = mappings[i]; | ||
|
|
||
| if (verbose && (i % 1000 == 0 || i == mappings.size() - 1)) { | ||
| printf("\r Processing cluster %zu/%zu (%.1f%%)...", |
BigVan
reviewed
Jun 15, 2026
| @@ -0,0 +1,1072 @@ | |||
| /* | |||
| * qcow2converter.cpp - Convert QCOW2 images to LSMT (zfile-compressed) format | |||
Member
There was a problem hiding this comment.
It changes qcow2 to LSMTFile without compression?
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds QCOW2→OverlayBD conversion support to enable sandbox workflows by letting overlaybd-apply ingest a QCOW2 image and write it into an existing OverlayBD ImageFile.
Changes:
- Introduces
qcow2converter(reader + partition/rootfs filtering + writer intoIFile). - Adds
--from_qcow2mode tooverlaybd-applyto trigger QCOW2 conversion instead of tar apply. - Updates tools build to compile
qcow2converter.cppintooverlaybd-apply.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 12 comments.
| File | Description |
|---|---|
| src/tools/qcow2converter.h | Declares the QCOW2→IFile conversion entrypoint and default block size. |
| src/tools/qcow2converter.cpp | Implements QCOW2 parsing, optional rootfs extraction, and writing clusters into OverlayBD ImageFile. |
| src/tools/overlaybd-apply.cpp | Adds CLI flag and calls converter to populate the image from a QCOW2 input. |
| src/tools/CMakeLists.txt | Adds converter source to overlaybd-apply build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7d67cd0 to
6884121
Compare
BigVan
reviewed
Jun 18, 2026
ad1915f to
7abac8d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To support sandbox,qcow2 img converter is necessary.