Refactor VM lifecycle around capabilities
Make host-integrated VM features fit a standard Go extension path instead of adding more one-off branches through vm.go. This is the enabling refactor for future work like shared mounts, not the /work feature itself. Add a daemon capability pipeline plus a structured guest-config builder, then move the existing /root work-disk mount, built-in DNS, and NAT wiring onto those hooks. Generalize Firecracker drive config at the same time so later storage features can extend machine setup without another hardcoded path. Add banger doctor on top of the shared readiness checks, update the docs to describe the new architecture, and cover the new seams with guest-config, capability, report, CLI, and full go test verification. Also verify make build and a real ./banger doctor run on the host.
This commit is contained in:
parent
9e98445fa2
commit
4930d82cb9
18 changed files with 1120 additions and 105 deletions
|
|
@ -16,11 +16,13 @@ func TestBuildConfig(t *testing.T) {
|
|||
KernelImagePath: "/kernel",
|
||||
InitrdPath: "/initrd",
|
||||
KernelArgs: "console=ttyS0",
|
||||
RootDrivePath: "/dev/mapper/root",
|
||||
WorkDrivePath: "/var/lib/banger/root.ext4",
|
||||
TapDevice: "tap-fc-1",
|
||||
VCPUCount: 4,
|
||||
MemoryMiB: 2048,
|
||||
Drives: []DriveConfig{
|
||||
{ID: "rootfs", Path: "/dev/mapper/root", IsRoot: true},
|
||||
{ID: "work", Path: "/var/lib/banger/root.ext4"},
|
||||
},
|
||||
TapDevice: "tap-fc-1",
|
||||
VCPUCount: 4,
|
||||
MemoryMiB: 2048,
|
||||
})
|
||||
|
||||
if cfg.SocketPath != "/tmp/fc.sock" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue