Feature Request
Allow PUT /snapshot/load to optionally override the huge-page configuration stored in the snapshot. Firecracker currently restores a snapshot using the huge_pages value recorded when the snapshot was created.
Consequently, a snapshot created with ordinary 4 KiB-backed guest memory cannot be restored using 2 MiB hugetlbfs-backed memory, even though the guest-visible memory contents are independent of the host page size.
Describe the desired solution
Add an optional huge_pages field to PUT /snapshot/load:
{
"snapshot_path": "...",
"mem_backend": {
"backend_type": "Uffd",
"backend_path": "..."
},
"huge_pages": "2M"
}
Supported values would match /machine-config: None and 2M.
When omitted, Firecracker would retain the current behavior and use the value stored in the snapshot. When supplied, it would override that value before allocating guest memory.
Describe possible alternatives
The current workaround is to boot separate source microVMs with each desired huge-page configuration and create duplicate snapshots. This increases snapshot storage and operational complexity without changing guest state.
Checks
Feature Request
Allow
PUT /snapshot/loadto optionally override the huge-page configuration stored in the snapshot. Firecracker currently restores a snapshot using thehuge_pagesvalue recorded when the snapshot was created.microvm_state.vm_info.huge_pages.Consequently, a snapshot created with ordinary 4 KiB-backed guest memory cannot be restored using 2 MiB hugetlbfs-backed memory, even though the guest-visible memory contents are independent of the host page size.
Describe the desired solution
Add an optional
huge_pagesfield toPUT /snapshot/load:Supported values would match
/machine-config:Noneand2M.When omitted, Firecracker would retain the current behavior and use the value stored in the snapshot. When supplied, it would override that value before allocating guest memory.
Describe possible alternatives
The current workaround is to boot separate source microVMs with each desired huge-page configuration and create duplicate snapshots. This increases snapshot storage and operational complexity without changing guest state.
Checks