Skip to content

Conversation

@helsaawy
Copy link
Contributor

@helsaawy helsaawy commented May 7, 2025

Add tool to merge layer tarball files, which is used for creating WCOW uVM images with additional features added, without first needing to create a dedicated container image.

This basically amounts to the append and flatten container image operations from the
crane tool, with some specific changes:

  • use "path" and not "path/filepath" for path manipulation, which avoids paths with \ separators;
  • append a trailing / to directory paths (since different tar implementations may append them); and
  • overwrite the owner UID and GID to zero, to avoid any user issues.

The tool avoids needing to unpack tar files within the same directory (as is done for LCOW) to combine the deltas with tar images.

Add tool to merge layer tarball files, which is used for creating
WCOW uVM images with additional features added, without first needing to
create a dedicated container image.

This basically amounts to the append and flatten container image
operations from the
[crane](github.com/google/go-containerregistry/cmd/crane) tool, with
some specific changes:
 - use `"path"` and not `"path/filepath"` for path manipulation, which
   avoids paths with `\` separators;
 - append a trailing `/` to directory paths (since different `tar`
   implementations may append them); and
 - overwrite the owner UID and GID to zero, to avoid any user issues.

The tool avoids needing to unpack tar files within the same directory
(as is done for LCOW) to combine the deltas with tar images.

Based on 2024 Hackathon to replace current LCOW uVM rootfs creation,
before the switch to Azure Linux.

Signed-off-by: Hamza El-Saawy <[email protected]>
@helsaawy helsaawy requested a review from a team as a code owner May 7, 2025 21:35
continue
}

//
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: cleanup extra '//'

@helsaawy helsaawy merged commit 5d78dc5 into microsoft:main May 14, 2025
30 of 33 checks passed
@helsaawy helsaawy deleted the uvmboot-wcow branch June 4, 2025 19:49
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.

3 participants