Skip to content

added LCOW Builder to generate final HCS document from annotations and options - #2616

Merged
Harsh Rawat (rawahars) merged 2 commits into
microsoft:mainfrom
rawahars:lcow_sandbox_spec
Mar 10, 2026
Merged

added LCOW Builder to generate final HCS document from annotations and options#2616
Harsh Rawat (rawahars) merged 2 commits into
microsoft:mainfrom
rawahars:lcow_sandbox_spec

Conversation

@rawahars

@rawaharsHarsh Rawat (rawahars) commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request introduces the LCOW Builder adding functionality for parsing and generating the final HCS document for LCOW scenarios. The changes provide detailed logic for handling cpu options, memory options, boot options, confidential computing settings, and device configurations, all driven by annotations and runtime options.

This package consolidates the LCOW logic present in old shim from various sources into a single package.
The HCS document generated from this package can be used to create an LCOW. No additional parsing would be required in the shim.

Note: This PR can only be merged after #2612

Documentation:

Introduced a comprehensive package-level doc comment in doc.go describing the purpose, entry points, and configuration areas handled by the lcow package.

Testing

Added unit tests for the parsing logic testing.

ok github.com/Microsoft/hcsshim/internal/builder/vm/lcow 3.787s coverage: 93.3% of statements

@rawahars
Harsh Rawat (rawahars) requested a review from a team as a code ownerMarch 2, 2026 12:32
@rawahars
Harsh Rawat (rawahars)force-pushed the lcow_sandbox_spec branch 4 times, most recently from 6414010 to 363b159CompareMarch 7, 2026 08:42
@rawaharsHarsh Rawat (rawahars) changed the title added specs pkg to generate LCOW Sandbox Specs from annotations and optionsadded LCOW Builder to generate final HCS document from annotations and optionsMar 7, 2026
Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
This commit adds a lcow builder for `containerd-shim-lcow-v1` shim. This package encapsulates the business logic to parse the annotations + devices + runhcs options into the final HCS document which will be used by the shim to create UVMs via HCS.
Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
@rawahars
Harsh Rawat (rawahars) merged commit 3b9a4af into microsoft:mainMar 10, 2026
17 checks passed
@rawahars
Harsh Rawat (rawahars) deleted the lcow_sandbox_spec branch March 10, 2026 21:21
Sign up for freeto 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

@rawahars@jterry75@helsaawy