Documentation
¶
Overview ¶
vzagent is the VZProvider guest control agent (RFC.vz.md §5): a static Linux binary listening on vsock port 1024 that answers exec, status and stop as length-prefixed JSON frames. It is baked into LinuxKit images as a service — see go/testdata/vz/linuxkit-vzagent.yml — and versioned with the host provider, so host and agent always ship together.
Build (from the module root):
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o vzagent ./cmd/vzagent
Stdlib note (AX-6): vzagent is a standalone GOOS=linux main that runs PID-1 adjacent inside a minimal guest — it uses the stdlib (flag, os/exec, bytes) rather than dappco.re/go helpers so the binary stays small, static and free of host-side framework dependencies.
vzagent interactive-shell support (SP4): OpenShell makes agentHandler a vzproto.ShellHandler, so the serve loop routes a VerbShell request to a shell running on a pseudo-terminal. creack/pty is pure Go, so the guest binary stays static (CGO_ENABLED=0) and free of host framework dependencies.