Skip to content

added specs pkg to generate LCOW Sandbox Specs from annotations and options#2616

Open
rawahars wants to merge 1 commit intomicrosoft:mainfrom
rawahars:lcow_sandbox_spec
Open

added specs pkg to generate LCOW Sandbox Specs from annotations and options#2616
rawahars wants to merge 1 commit intomicrosoft:mainfrom
rawahars:lcow_sandbox_spec

Conversation

@rawahars
Copy link
Contributor

@rawahars rawahars commented Mar 2, 2026

Summary

This pull request introduces the specs package adding functionality for parsing and generating sandbox specifications 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 sandbox specs 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 #2609

Documentation:

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

Testing

Added unit tests for the parsing logic testing.

ok      github.com/Microsoft/hcsshim/cmd/containerd-shim-lcow-v1/specs  4.033s  coverage: 87.8% of statements

This commit adds a specs package to `containerd-shim-lcow-v1` shim. This package encapsulates the business logic to parse the annotations + devices + runhcs options into the Sandbox Spec which will be used by the shim to create UVMs via HCS.

Signed-off-by: Harsh Rawat <harshrawat@microsoft.com>
@rawahars rawahars requested a review from a team as a code owner March 2, 2026 12:32
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.

1 participant