From 4dde00b05c3e3cb46a85396f9c9dbd37c8bc9378 Mon Sep 17 00:00:00 2001 From: Emily Casey Date: Tue, 27 Feb 2018 09:21:03 -0500 Subject: [PATCH] Configure guest with 9P mount and vsock port when using existing VPNKit instance Signed-off-by: Emily Casey --- src/cmd/linuxkit/run_hyperkit.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cmd/linuxkit/run_hyperkit.go b/src/cmd/linuxkit/run_hyperkit.go index 5897a90b5..6d6ff29c8 100644 --- a/src/cmd/linuxkit/run_hyperkit.go +++ b/src/cmd/linuxkit/run_hyperkit.go @@ -245,6 +245,10 @@ func runHyperKit(args []string) { if len(netMode) > 2 { vpnkitPortSocket = netMode[2] } + // The guest will use this 9P mount to configure which ports to forward + h.Sockets9P = []hyperkit.Socket9P{{Path: vpnkitPortSocket, Tag: "port"}} + // VSOCK port 62373 is used to pass traffic from host->guest + h.VSockPorts = append(h.VSockPorts, 62373) } else { // Start new VPNKit instance h.VPNKitSock = filepath.Join(*state, "vpnkit_eth.sock")