Skip to content

Set default CPU template to T2 for cross-platform VM compatibility#34

Open
liujunhui2 wants to merge 3 commits intoaws-samples:mainfrom
liujunhui2:feature/cpu-template-default
Open

Set default CPU template to T2 for cross-platform VM compatibility#34
liujunhui2 wants to merge 3 commits intoaws-samples:mainfrom
liujunhui2:feature/cpu-template-default

Conversation

@liujunhui2
Copy link
Copy Markdown

Summary

  • Set Firecracker VM CPU template to T2 by default in setMachineConfig, ensuring VMs don't inherit host-specific CPU features that break cross-platform migration
  • Added optional CPUTemplate field to ProcessOptions to allow callers to override the default (e.g. T2A for AMD, T2CL for Cascade Lake)
  • Existing callers are unaffected — the new field defaults to nil, which triggers the T2 default

Test plan

  • Verify go build ./... passes in the orchestrator package
  • Deploy to a test environment and confirm Firecracker VMs start successfully with T2 template
  • Verify VM snapshots taken on one Intel host can resume on another Intel host

🤖 Generated with Claude Code

Ubuntu and others added 3 commits March 30, 2026 03:43
Without a CPU template, Firecracker VMs inherit host CPU features,
which can cause failures when migrating VMs across different CPU
platforms. Default to T2 with optional override via ProcessOptions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow overriding the default T2 CPU template via the FC_CPU_TEMPLATE
environment variable for AMD (T2A) and ARM (V1N1) hosts. Add VM
configuration section to README with template descriptions and usage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Return a clear error if an invalid CPU template is specified via
the environment variable, instead of failing at the Firecracker API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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