Temp PR for visual diff of VM templating change. DO NOT MERGE#456
Draft
Camelron wants to merge 17 commits into
Draft
Temp PR for visual diff of VM templating change. DO NOT MERGE#456Camelron wants to merge 17 commits into
Camelron wants to merge 17 commits into
Conversation
The CLH impl of Hypervisor iface was missing Save and Pause functions that are crucial for creating a template. This commit implements those functions and snapshot is getting saved when the template initialization finishes. Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
Although the official Kata docs require initrd image with VM templating. However, even with a root disk image the overlay upper layer is created in memory. Which will be captured in the VM snapshot. Therefore, the initrd image constraint does not apply for VM templating. Update the test TestCheckFactoryConfig to not expect error when template is enabled and RootFS image is specified. Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
Create the VM Template's memory file as an empty file with size equal to that of the VM's memory size. Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
When VM is booted to be template or booted from template, its memory is to be backed by a file. This commit updates the memory config to use a file in both cases. Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
The template VM is created with the default value for VMStorePath, causing the runtime to be unable to reach the CLH VM's API socket. This commit sets the VMStorePath to be equal to the VM's statePath, which is set to the `factory.template_path` config parameter. Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
Make deviceStatePath calculation in VM template workflow configurable based on hypervisor, instead of hardcoding it to `state`. Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
Expand the scope of the resetHypervisorConfig function to include resetting sandbox name, namespace and the default max vcpus. Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
Update config.json for the CLH VM template to set memory shared=false. This forces the VMs created from the template to trigger CoW. Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
Add logic to restore VM from snapshot instead of starting new VM when VM template is enabled. Copy the config.json and state.json to the new VM's VmStorePath, and update the config to create the VSOCK device for Kata agent in the VmStorePath. Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
Use diff storage paths for diff VMs created from the same template. Add comments to the test. Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
Implement the first draft of the VM Templating integration K8s tests. Signed-off-by: Harshit Gupta <guptaharshit@microsoft.com>
…eparation wip commit message
7c3ad7a to
d0c37a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merge Checklist
Summary
Associated issues
Links to CVEs
Test Methodology