From abece1591a16c19f5de3b9deaf80d55fc5ea67c8 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 | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/createdisk.sh b/createdisk.sh index 054e516f..293c84bf 100755 --- a/createdisk.sh +++ b/createdisk.sh @@ -97,12 +97,39 @@ 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 <