feat: multi-distro support and tagged golden snapshots
Add Alpine, Debian, and Ubuntu rootfs support to `init [distro]`. Golden snapshots are now namespaced under `golden/<tag>/` so multiple baselines can coexist. `spawn [tag] [N]` selects which snapshot to clone from. Systemd-based distros (Debian, Ubuntu) get a fc-net-init systemd unit; Alpine keeps its inittab-based init. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,11 +25,11 @@ import (
|
||||
// It restores a Firecracker clone from the golden snapshot, connecting its serial
|
||||
// console (ttyS0) to a PTY, then serves the PTY master on a Unix socket at
|
||||
// {cloneDir}/console.sock for the lifetime of the VM.
|
||||
func RunConsoleProxy(cfg Config, id int, tapName string) error {
|
||||
func RunConsoleProxy(cfg Config, id int, tapName, tag string) error {
|
||||
logger := log.WithField("component", fmt.Sprintf("console-proxy[%d]", id))
|
||||
|
||||
cloneDir := filepath.Join(cfg.BaseDir, "clones", strconv.Itoa(id))
|
||||
goldenDir := filepath.Join(cfg.BaseDir, "golden")
|
||||
goldenDir := filepath.Join(cfg.BaseDir, "golden", tag)
|
||||
sockPath := filepath.Join(cloneDir, "api.sock")
|
||||
consoleSockPath := filepath.Join(cloneDir, "console.sock")
|
||||
sharedMem := filepath.Join(goldenDir, "mem")
|
||||
|
||||
Reference in New Issue
Block a user