Documentation
¶
Overview ¶
Package vmexec is the ossein guest container runtime — the Go port of Apple's vmexec. It runs as a re-exec'd `stage2` child of the agent: the agent launches /proc/self/exe with the container's namespaces already applied via clone, and stage2 performs the in-namespace setup (stdio, rootfs pivot, mounts, caps, uid/gid) then execs the workload.
The re-exec replaces vmexec's unshare()+fork(): Go cannot run arbitrary code after fork(), so namespaces are created at clone time (SysProcAttr.Cloneflags on the agent side) and this fresh process does the rest, mirroring the order of vmexec's RunCommand.childSetup.
The package doc lives in this portable file rather than stage2.go (linux-only) so the package is documented on every GOOS the native analysis runs under.
Index ¶
Constants ¶
const Stage2Command = "stage2"
Stage2Command is the argv[0+1] token that selects the stage2 role of the multi-call guest binary. Three places must agree on it — guest/vminitd dispatches on it, guestagent passes it when re-execing, and Stage2 names its flag set with it — so it is declared once, here, where the role is implemented. It is guest-internal, NOT part of the host↔guest protocol: the host never sees this argv.
Variables ¶
This section is empty.
Functions ¶
func ParseMountOptions ¶
ParseMountOptions splits OCI mount options into a mount(2) flag bitmask and the comma-joined remainder (filesystem-specific data). It is the single implementation shared with the agent's Mount RPC.
Types ¶
This section is empty.