Support booting isolated SNP from a GuestStateFile rather than separate kernel/initrd. #1206
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support booting isolated SNP from a GuestStateFile rather than separate kernel and userland (initrd.img)
Mainly this refactors the code that creates the hcs api json document into two paths. One is the previous logic that will create a kernel command line and boot the kernel and userland from individual files using the "LinuxKernelDirect" scheme. With isolation enabled this must be replaced with "GuestState/GuestStateFilePath" etc to load from a vmgs file.
There are updates and addition files in the schema2 directory to support the newer hcs API so that the existing way where an object that represents the hcs api json is built and then serialised to json can be used with isolation_setting etc.
If a SecurityPolicy annotation is present it will boot the vmgs file unless "io.microsoft.virtualmachine.lcow.no_security_hardware" is set to true. The various example pod.json files will need to be updated for use with non SNP machines.