aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md21
1 files changed, 18 insertions, 3 deletions
diff --git a/README.md b/README.md
index 5b81928..874cc45 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,9 @@
# firecracker
NixOS guests in [Firecracker](https://firecracker-microvm.github.io/),
-started from a NixOS host, dropping into a root shell on the serial
-console. Boots in about a second and a quarter. Stable Nix, no flakes.
+started from a NixOS host, reached by ssh, or with `layers/console.nix`,
+dropping into a root shell on the serial console. Boots in about a
+second and a quarter. Stable Nix, no flakes.
The guest gets:
@@ -75,7 +76,20 @@ nix-build pkgs/run-firecracker-vm
./result/bin/run-firecracker-vm
```
-Leave the guest with `reboot`.
+The guest's console (the run script's terminal) shows the kernel's and
+systemd's messages, but has no shell, unless the guest has
+`layers/console.nix`: root logged in on the console (or another user,
+with `services.getty.autologinUser`; `null` for a login prompt, which
+needs a password). It's small, so rather than a layer, with an image,
+of its own, import it into another layer:
+
+```nix
+{ imports = [ /path/to/firecracker/layers/console.nix ]; }
+```
+
+(As a layer of its own, it works, too: `--arg layers '[ layers/console.nix ]'`.)
+
+Leave the guest with `reboot` (there, or via ssh, see below).
The guest's store is read-only, and there's no nix, unless it has the
nix layer, preferably first, so its image is the same for all guests
@@ -225,6 +239,7 @@ For `nix-shell` and the like to download, allow `cache.nixos.org`.
the Firecracker configuration, and the `run-firecracker-vm` script.
- `pkgs/run-firecracker-vm/kernel.nix`: the cut-down kernel.
- `layers/nix.nix`: nix, as a layer.
+- `layers/console.nix`: a shell on the serial console, to import into a layer.
- `modules/host/default.nix`: the host's side: network, DHCP/DNS, egress
proxy, `fc-egress`.
- `modules/host/egress.lua`: the egress policy, for the proxy (OpenResty).