Support nested virtualization#26
Open
nmanthey wants to merge 8 commits into
Open
Conversation
Replace c5a.4xlarge (AMD EPYC) with c8i.4xlarge (Intel Xeon 6) as the default x86_64 instance type in DEFAULT_PLATFORM_MAP. The c8i family provides a newer CPU generation with equivalent compute resources (16 vCPUs, 32 GB RAM) and is a prerequisite for enabling nested virtualization support. This change affects KernelCI pull-lab jobs: when the poller translates a job_definition for an x86_64 workload, it will now launch c8i.4xlarge instances instead of c5a.4xlarge. Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
Add automatic detection and enablement of nested virtualization when launching EC2 instances from supported Intel-based families. When a supported instance type is detected, the CpuOptions parameter with NestedVirtualization=enabled is passed to the RunInstances API call. This exposes Intel VT-x to the guest, allowing KVM and Hyper-V workloads to run inside the EC2 instance. Supported families per AWS documentation: C8i, M8i, R8i, X8i, C7i, M7i, R7i, I7i and their variants (flex, d). Reference: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-ec2-nested-virtualization.html Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
Update instance_type from c5a.4xlarge to c8i.4xlarge in both example configuration files to match the new default platform map. This ensures local runs and integration tests use the same instance type as KernelCI-triggered pull-lab jobs. Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
The repository default branch is 'main' but all workflows referenced 'mainline', causing them to never trigger on pull requests or pushes. Changes: - basic-ci.yml: trigger on main, drop Python 3.9/3.10 from matrix (package requires >=3.11) - coverage-check.yml: checkout origin/main for base coverage - codeql.yml: trigger on main Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
- cli.py: remove empty f-string, wrap long line - artifacts.py: remove trailing blank line - pull_labs_poller.py: remove unused submit_tests import - test_kcidb_submit.py: add blank lines before nested definitions - test_pull_labs_poller.py: remove unused tempfile import, fix over-indented continuation lines, rewrite test to not patch the removed submit_tests symbol - test_pull_labs_translate.py: remove unused DEFAULT_TEST_TYPE_MAP import Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
- setup.py: add analysis deps (pandas, matplotlib, seaborn) to [dev] extra so pylint can resolve all imports during linting - pull_labs_poller.py: suppress unused-import on intentional boto3 availability check - setup_validate.py: remove redundant json.JSONDecodeError from except clauses (already covered by parent ValueError) - test_pull_labs_poller.py: disable protected-access check (tests intentionally exercise private methods) - test_role_manager.py: disable protected-access check - test_kcidb_submit.py: suppress unused-argument on mock callbacks that must match urlopen signature Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
Add test_nested_virtualization.py covering _supports_nested_virtualization() in VMLauncher. Tests verify that C8i, M8i, R8i, C7i, M7i, R7i, X8i, I7i families (and flex/d variants) are correctly detected as supporting nested virtualization, while older families (c5a, c6g, t3, m5) are not. Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
7f32e80 to
bf3e19d
Compare
Twine check failed because the content type was missing, defaulting to RST which cannot parse Markdown backticks. Set content type explicitly to text/markdown. Signed-off-by: Norbert Manthey <nmanthey@amazon.de>
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.
To be able to test virtualization feature better, let's use the c8i instance type by default. That instance type supports nested virtualization within Amazon EC2 instances. Enable nested virtualization by default, if detected. Update example configurations.
With this feature in place, we can install a kernel as part of the test, and then also test the virtualization features of that kernel.