-
Notifications
You must be signed in to change notification settings - Fork 219
Add support for nested virtualization on GCE instances #1537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Nested Virtualization | ||
|
||
Enable nested virtualization to run VMs inside GCE instances via the `enableNestedVirtualization` field. This allows running container sandboxes, KVM, QEMU, or other hypervisors inside the instance. Requires Intel Haswell or later CPU platforms. | ||
|
||
```yaml | ||
--- | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | ||
kind: GCPMachineTemplate | ||
metadata: | ||
name: mygcpmachinetemplate | ||
namespace: mynamespace | ||
spec: | ||
template: | ||
spec: | ||
instanceType: n2-standard-8 | ||
enableNestedVirtualization: true | ||
``` | ||
https://cloud.google.com/compute/docs/instances/nested-virtualization/overview | ||
NOTE: Nested virtualization must be enabled at instance creation time and cannot be changed after the instance is created. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we generally treat machines as immutable anyway - i.e. we would launch a new machine, even if the field was mutable. My understanding could be out of date though. Not sure there's any harm in the NOTE though, but I don't think it's going to be a problem in practice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if we should nest this under
advancedMachineFeatures
to reflect the GCP API, but to be honest I'm not sure that "advanced" is really a semantic grouping, so I think I prefer the flattened structure. It's always risky to change the structure because we can't predict the future evolution of the upstream API, but in this case I think it's fine!