Skip to content

Add --vsock option for guest-to-host Unix socket IPC - #88

Open
phact wants to merge 1 commit into
libkrun:mainfrom
phact:vsock
Open

Add --vsock option for guest-to-host Unix socket IPC#88
phact wants to merge 1 commit into
libkrun:mainfrom
phact:vsock

Conversation

@phact

@phact phact commented Aug 11, 2026

Copy link
Copy Markdown

Allow mapping guest AF_VSOCK ports to Unix sockets on the host via libkrun's krun_add_vsock_port(). A guest connection to (CID 2, PORT) is proxied to the host socket at PATH, so host services can be reached without giving the guest any network access. The flag can be repeated to map multiple ports:

krunvm start myvm --vsock 8765:/run/bridge.sock -- ...

Only wired into 'krunvm start' for now; the mapping is per-invocation and intentionally not persisted in the VM config.

Allow mapping guest AF_VSOCK ports to Unix sockets on the host via
libkrun's krun_add_vsock_port(). A guest connection to (CID 2, PORT)
is proxied to the host socket at PATH, so host services can be reached
without giving the guest any network access. The flag can be repeated
to map multiple ports:

    krunvm start myvm --vsock 8765:/run/bridge.sock -- ...

Only wired into 'krunvm start' for now; the mapping is per-invocation
and intentionally not persisted in the VM config.

Signed-off-by: phact <estevezsebastian@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant