From af7894cf1d695551ffc2211314d6f9bc5cc05feb Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 21 Nov 2026 02:20:34 +0000 Subject: run-firecracker-vm: fc.home.required, for layers with state in /home A layer that keeps its state in /home can set fc.home.required, and the run script then refuses to start the guest without --home, instead of booting with /home on the tmpfs, where the state is gone when the guest exits. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index b00e196..cfa364e 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,15 @@ from the store, so either can be kept or thrown away): ./result/bin/run-firecracker-vm --home ~/fc-home.img [--home-size 50G] ``` +A layer that keeps its state in `/home` can make that disk mandatory, +so the state doesn't silently end up on the tmpfs: + +```nix +{ fc.home.required = true; } +``` + +The run script then refuses to start the guest without `--home`. + `/nixpkgs` is the nixpkgs the guest was built from (``, checkout or not); `--nixpkgs DIR` serves another one. It's not cached in the guest, so changes to it show up right away, but evaluating is slow; -- cgit v1.3.1