Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dmverity tool to take a directory as input to create a VHD #2274

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hgarvison
Copy link
Contributor

@hgarvison hgarvison commented Sep 24, 2024

Update dmverity tool to take a file directory as input, tar it, and create a VHD.

@hgarvison hgarvison requested a review from a team as a code owner September 24, 2024 18:50
@helsaawy
Copy link
Contributor

i am not sure the tar creation should be part of dmverity/our package, since we are basically always guaranteed that tar/tar.exe is available on whatever machine we run on
or am i missing something?

@hgarvison
Copy link
Contributor Author

@helsaawy the tar creation is taking a directory of files and tarring it so that it can be run through the tooling to generate a VHD with the merkel tree. This is for the scenario where we are not creating a VHD from image layers, but rather, a directory of other files and subdirectories.

@helsaawy
Copy link
Contributor

This is for the scenario where we are not creating a VHD from image layers, but rather, a directory of other files and subdirectories.

in that scenario, can't you just call tar -cf layer.tar -C directory . to create the tarball?

@hgarvison
Copy link
Contributor Author

This is for the scenario where we are not creating a VHD from image layers, but rather, a directory of other files and subdirectories.

in that scenario, can't you just call tar -cf layer.tar -C directory . to create the tarball?

Yes, but that adds an extra step for the user.

@anmaxvl
Copy link
Contributor

anmaxvl commented Sep 25, 2024

This is for the scenario where we are not creating a VHD from image layers, but rather, a directory of other files and subdirectories.

in that scenario, can't you just call tar -cf layer.tar -C directory . to create the tarball?

Yes, but that adds an extra step for the user.

I don't think that this should be dmverity-vhd's responsibility to tar though... I feel like we can add functionality to convert non-image tars to VHDs with verity, but the caller should do the tar.

takuro-sato and others added 3 commits September 27, 2024 13:41
…rosoft#2270)

Make tar2ext4 deterministic with files without parent dir in tar

Signed-off-by: Takuro Sato <takurosato@microsoft.com>
Signed-off-by: Heather Garvison <hgarvison@microsoft.com>
When creating HCS doc for SNP UVM with verity boot, the SCSI
controllers are overriden to always have only a single SCSI
controller. This limits the max number of container layers to
64.

Signed-off-by: Maksim An <maksiman@microsoft.com>
Signed-off-by: Heather Garvison <hgarvison@microsoft.com>
Signed-off-by: Heather Garvison <hgarvison@microsoft.com>
Copy link
Contributor

@helsaawy helsaawy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -431,8 +432,8 @@ var createVHDCommand = cli.Command{
Usage: "creates LCOW layer VHDs inside the output directory with dm-verity super block and merkle tree appended at the end",
Flags: []cli.Flag{
cli.StringFlag{
Name: imageFlag + ",i",
Usage: "Required: container image reference",
Name: inputFlag + ",i",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mior nit: we may want to keep the old flag name around just to avoid breaking current usage

Suggested change
Name: inputFlag + ",i",
Name: inputFlag + ",image,i",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants