Skip to content

[Feature Request] Allow overriding huge-page configuration during snapshot restore #6036

Description

@lisasgoh

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

  • Have you searched the Firecracker Issues database for similar requests?
  • Have you read all the existing relevant Firecracker documentation?
  • Have you read and understood Firecracker's core tenets?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions