What’s in the patch
vendor/firecracker-patches/0001-podflare-vsock-uds-override.patch adds two optional fields toLoadSnapshotConfig:
microvm_state.device_states.mmio_state:
vsock_device.device_state.backend.uds_path←vsock_uds_path_overrideblock_devices[i].disk_path← matchingdrive_overrides[*].path_on_host
pub
on formerly-private VirtioBlockState fields). We also expose a 0-line
change to use the existing snapshot_type: "Diff" flow.
Why we need this
Everyfork(n=5) restores 5 Firecracker microVMs from a single snapshot.
Each child must bind its own host-side vsock UDS (because they’re all
concurrent) and use its own rootfs file (because writes must be
CoW-isolated). Upstream Firecracker hardcodes those paths from the
snapshot state; there’s no post-load-pre-resume API to patch them.
Without this patch, multiple concurrent restores would collide — second
child errors because the UDS already exists, or worse, overlaps on the
rootfs file and corrupts it.
Build
v1.15.1), applies every
patch in vendor/firecracker-patches/ in lexical order, builds, and
installs.
Rebase policy
Firecracker releases every ~6 weeks. When we bump the pin:Upstreaming
The vsock override is a small, reasonable feature. We may submit it upstream. If accepted, the patch file disappears andbuild-firecracker.sh
stops applying it — no Podflare-side changes needed.
