Skip to main content
Expose a host Unix socket or local Windows named pipe to a sandbox over virtio-vsock. See VSock for guest connection details, platform support, and security considerations.
VSock routes are local-only and unavailable with the multi-tenant deployment profile.

Typical flow

SandboxBuilder

vsock()

Expose a host Unix stream socket or local Windows named pipe on host CID 2 at port.

vsock_dgram()

Expose a host Unix datagram socket while preserving datagram boundaries. Datagram routes are unavailable on Windows.

vsock_route()

Add a fully specified route using VsockRouteSpec.

VsockRouteSpec

Import path: microsandbox::sandbox::VsockRouteSpec. Host paths must be absolute, and each socket type and port pair must be unique.

VsockSocketType

Import path: microsandbox::sandbox::VsockSocketType.