Skip to content

[shimV2] refactor service layer + Vm controller to create HCS document in controller #2687

@rawahars

Description

@rawahars

Presently, we create the HCS document in the service layer and then pass that along to the VM Controller in Create call.

hcsDocument, sandboxOptions, err := lcow.BuildSandboxConfig(ctx, ShimName, request.BundlePath, shimOpts, &sandboxSpec)

This also leaks other VM options such as confidential, etc into service layer which can be encapsulated within the VM Controller.
Basically, service sends the specs to vmController.Create. It calls the LCOW or WCOW tagged file to generate the HCS document and sandbox options which it stores internally. Next during Start it references the same to create Confidential stack.
For other cases such as Network controller etc, it can use the same.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions