{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/firecracker/json-schema/firecracker-snapshot-load-params-schema.json",
  "title": "SnapshotLoadParams",
  "description": "Defines the configuration used for handling snapshot resume. Exactly one of the two `mem_*` fields must be present in the body of the request.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/firecracker-snapshot-api-openapi.yml#/components/schemas/SnapshotLoadParams",
  "type": "object",
  "required": [
    "snapshot_path"
  ],
  "properties": {
    "enable_diff_snapshots": {
      "type": "boolean",
      "description": "(Deprecated) Enable dirty page tracking to improve space efficiency of diff snapshots"
    },
    "track_dirty_pages": {
      "type": "boolean",
      "description": "Enable dirty page tracking to improve space efficiency of diff snapshots"
    },
    "mem_file_path": {
      "type": "string",
      "description": "Path to the file that contains the guest memory to be loaded. It is only allowed if `mem_backend` is not present. This parameter has been deprecated and it will be removed in future Firecracker release."
    },
    "mem_backend": {
      "$ref": "#/$defs/MemoryBackend",
      "description": "Configuration for the backend that handles memory load. If this field is specified, `mem_file_path` is forbidden. Either `mem_backend` or `mem_file_path` must be present at a time."
    },
    "snapshot_path": {
      "type": "string",
      "description": "Path to the file that contains the microVM state to be loaded."
    },
    "resume_vm": {
      "type": "boolean",
      "description": "When set to true, the vm is also resumed if the snapshot load is successful."
    },
    "network_overrides": {
      "type": "array",
      "description": "Network host device names to override",
      "items": {
        "$ref": "#/$defs/NetworkOverride"
      }
    },
    "vsock_override": {
      "$ref": "#/$defs/VsockOverride",
      "description": "Overrides the vsock device's UDS path on snapshot restore. This is useful for restoring a snapshot with a different socket path than the one used when the snapshot was created. For example, when the original socket path is no longer available or when deploying to a different environment."
    },
    "clock_realtime": {
      "type": "boolean",
      "description": "[x86_64 only] When set to true, passes KVM_CLOCK_REALTIME to KVM_SET_CLOCK on restore, advancing kvmclock by the wall-clock time elapsed since the snapshot was taken. When false (default), kvmclock resumes from where it was at snapshot time. This option may be extended to other clock sources and CPU architectures in the future."
    }
  },
  "$defs": {
    "MemoryBackend": {
      "type": "object",
      "required": [
        "backend_type",
        "backend_path"
      ],
      "properties": {
        "backend_type": {
          "type": "string",
          "enum": [
            "File",
            "Uffd"
          ]
        },
        "backend_path": {
          "type": "string",
          "description": "Based on 'backend_type' it is either 1) Path to the file that contains the guest memory to be loaded 2) Path to the UDS where a process is listening for a UFFD initialization control payload and open file descriptor that it can use to serve this process's guest memory page faults"
        }
      }
    },
    "NetworkOverride": {
      "type": "object",
      "description": "Allows for changing the backing TAP device of a network interface during snapshot restore.",
      "required": [
        "iface_id",
        "host_dev_name"
      ],
      "properties": {
        "iface_id": {
          "type": "string",
          "description": "The name of the interface to modify"
        },
        "host_dev_name": {
          "type": "string",
          "description": "The new host device of the interface"
        }
      }
    },
    "VsockOverride": {
      "type": "object",
      "description": "Allows for changing the backing Unix Domain Socket of a vsock device during snapshot restore.",
      "required": [
        "uds_path"
      ],
      "properties": {
        "uds_path": {
          "type": "string",
          "description": "The new path for the backing Unix Domain Socket."
        }
      }
    }
  }
}