Skip to content

Add CPU and memory fields to the Cloud Hypervisor VM config - #952

Open
vincepri wants to merge 1 commit into
apple:mainfrom
vincepri:ch-vmconfig-fields
Open

vincepri wants to merge 1 commit into
apple:mainfrom
vincepri:ch-vmconfig-fields

Conversation

@vincepri

@vincepri vincepri commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

The CloudHypervisor types now model these fields of the Cloud Hypervisor OpenAPI spec (present since before v52.0):

  • CpusConfig.features (CpuFeatures, with amx)
  • CpusConfig.core_scheduling (CoreSchedulingMode: Vm, Vcpu, Off)
  • CpusConfig.nested
  • MemoryConfig.hugepages
  • MemoryConfig.prefault

All are optional and nil by default, and nil fields are not encoded, so the JSON for an existing configuration does not change. A CHInstanceExtension can set them in configureCH.

Tests

  • TypesTests: the new fields encode with the OpenAPI keys and round-trip; nil fields are omitted.

The CloudHypervisor types now model these fields of the Cloud Hypervisor
OpenAPI spec (present since before v52.0):

- CpusConfig.features (CpuFeatures, with amx)
- CpusConfig.core_scheduling (CoreSchedulingMode: Vm, Vcpu, Off)
- CpusConfig.nested
- MemoryConfig.hugepages
- MemoryConfig.prefault

All are optional and nil by default, and nil fields are not encoded, so the
JSON for an existing configuration does not change. A CHInstanceExtension
can set them in configureCH.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant