From cf5affcff1f57124d6d2fa11a20f995a5c187226 Mon Sep 17 00:00:00 2001 From: Gunjan Vyas Date: Tue, 21 Jan 2025 12:31:44 +0530 Subject: [PATCH] gvforwarder as a systemd service - Create a tap device using nmcli with a hardcoded mac address - Start gvforwarder systemd service which will use this device Signed-off-by: vyasgun --- createdisk.sh | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/createdisk.sh b/createdisk.sh index 054e516f..be0710df 100755 --- a/createdisk.sh +++ b/createdisk.sh @@ -97,12 +97,38 @@ if podman manifest inspect quay.io/crcont/routes-controller:${OPENSHIFT_VERSION} image_tag=${OPENSHIFT_VERSION} fi +# create the tap device interface with specified mac address +# this mac address is used to allocate a specific IP to the VM +# when tap device is in use. +${SSH} core@${VM_IP} 'sudo bash -x -s' < /etc/systemd/system/gvisor-tap-vsock.service + podman create --name=gvisor-tap-vsock quay.io/crcont/gvisor-tap-vsock:latest + podman cp gvisor-tap-vsock:/vm /usr/local/bin/gvforwarder + podman rm gvisor-tap-vsock + tee /etc/systemd/system/gv-user-network@.service <