You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: use C8i/M8i instances for AWS nested virt (10x cheaper than metal) (#124)
AWS Intel Xeon 6 families (C8i, M8i, R8i) support nested virtualization
on standard (non-metal) instances since late 2025. Update default from
m5.metal ($4.61/hr) to m8i.2xlarge ($0.46/hr) with fallbacks through
c8i.2xlarge, r8i.2xlarge, m8i.4xlarge, and m5.metal as legacy option.
Updated files:
- aws_vm.py: new INSTANCE_TYPE and INSTANCE_TYPE_FALLBACKS
- CLAUDE.md: updated cost table
- docs/rl_quick_start.md: updated cost estimates
- docs/ec2_setup_guide.md: updated instance types, costs, and instructions
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AWS requires `m5.metal` ($4.61/hr) for KVM/QEMU nested virtualization. First boot takes ~35 min (Windows download + install). Costs per full WAA stack test:
157
+
AWS uses `m8i.2xlarge` (~$0.46/hr) for KVM/QEMU nested virtualization (Intel Xeon 6 families C8i/M8i/R8i support nested virt on standard instances since late 2025). First boot takes ~35 min (Windows download + install). Costs per full WAA stack test:
158
158
159
159
| Phase | Time | Cost |
160
160
|-------|------|------|
161
-
| VM + Docker setup |~14 min | $1.08|
162
-
| Docker image build |~7 min | $0.54|
163
-
| Windows install + boot |~20 min | $1.54|
164
-
| Benchmark runtime | varies | $4.61/hr |
161
+
| VM + Docker setup |~14 min | $0.11|
162
+
| Docker image build |~7 min | $0.05|
163
+
| Windows install + boot |~20 min | $0.15|
164
+
| Benchmark runtime | varies | $0.46/hr |
165
165
166
166

-**Instance type**: `m5.metal` is required (bare-metal for KVM/QEMU nested virtualization). Standard instances like `g4dn.xlarge` or`t3.xlarge` do NOT expose `/dev/kvm` and cannot run QEMU.
36
+
-**Instance type**: `m8i.2xlarge` is recommended (~$0.46/hr). Intel Xeon 6 families (C8i, M8i, R8i) support nested virtualization on standard (non-metal) instances since late 2025. Legacy metal instances (`m5.metal` at ~$4.61/hr) also work but at ~10x the cost. Older standard instances like`t3.xlarge` do NOT expose `/dev/kvm` and cannot run QEMU.
37
37
-**OS**: Ubuntu 22.04 LTS (Canonical official AMI, auto-discovered by the CLI)
38
38
-**Ports**: Only SSH (22) is opened in the security group. All other access goes through SSH tunnels.
1. Finds an available `m5.metal` instance and region (tries us-east-1, us-west-2, us-east-2, eu-west-1)
145
+
1. Finds an available instance type with nested virt support (tries m8i.2xlarge, c8i.2xlarge, r8i.2xlarge, m8i.4xlarge, m5.metal in order) and region (us-east-1, us-west-2, us-east-2, eu-west-1)
146
146
2. Creates VPC infrastructure if needed (VPC, subnet, internet gateway, security group, key pair)
| Windows 11 download + install (first boot) |~20 min | $1.54|
631
-
| Windows boot (subsequent) |~1-5 min | $0.08-0.38|
632
-
|**Total first boot**|**~35 min**|**~$2.61**|
633
-
| Benchmark runtime | varies | $4.61/hr |
628
+
| Phase | Time | Cost (m8i.2xlarge) |
629
+
|-------|------|--------------------|
630
+
| EC2 launch + SSH ready |~2 min | $0.02|
631
+
| Docker + image build |~12 min | $0.09|
632
+
| Windows 11 download + install (first boot) |~20 min | $0.15|
633
+
| Windows boot (subsequent) |~1-5 min | $0.01-0.04|
634
+
|**Total first boot**|**~35 min**|**~$0.27**|
635
+
| Benchmark runtime | varies | $0.46/hr |
634
636
635
637
### Storage costs (when paused)
636
638
@@ -642,9 +644,9 @@ Paused VMs (stopped instances) do not incur compute charges, but EBS storage con
642
644
643
645
### "No available EC2 instance type/region found"
644
646
645
-
`m5.metal` may not be available in all regions. The CLI tries us-east-1, us-west-2, us-east-2, eu-west-1 in order. If all fail:
647
+
The preferred instance type (`m8i.2xlarge`) may not be available in all regions. The CLI tries multiple instance types (m8i, c8i, r8i, then m5.metal) across regions (us-east-1, us-west-2, us-east-2, eu-west-1) in order. If all fail:
646
648
1. Check your vCPU quota: AWS Console > Service Quotas > EC2 > "Running On-Demand Standard instances"
647
-
2. Request a quota increase to at least 96 vCPUs
649
+
2. Request a quota increase to at least 8 vCPUs (or 96 vCPUs if falling back to m5.metal)
648
650
3. Try a different region: `oa-vm smoke-test-aws --region eu-west-1`
0 commit comments