From 3879ea2a61fab1f55684aefbf83239a583197f19 Mon Sep 17 00:00:00 2001 From: Gunjan Vyas Date: Tue, 21 Jan 2025 12:31:44 +0530 Subject: [PATCH 1/2] 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 | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/createdisk.sh b/createdisk.sh index a90a5eb5..0bf92bdb 100755 --- a/createdisk.sh +++ b/createdisk.sh @@ -94,23 +94,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/containers/systemd/gvisor-tap-vsock.container < Date: Tue, 13 May 2025 17:58:07 +0530 Subject: [PATCH 2/2] Use gvisor-tap-vsock-gvforwarder package instead image Signed-off-by: Praveen Kumar --- createdisk.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/createdisk.sh b/createdisk.sh index 0bf92bdb..4ae65ae7 100755 --- a/createdisk.sh +++ b/createdisk.sh @@ -16,7 +16,7 @@ INSTALL_DIR=${1:-crc-tmp-install-data} OPENSHIFT_VERSION=$(${JQ} -r .clusterInfo.openshiftVersion $INSTALL_DIR/crc-bundle-info.json) BASE_DOMAIN=$(${JQ} -r .clusterInfo.baseDomain $INSTALL_DIR/crc-bundle-info.json) BUNDLE_TYPE=$(${JQ} -r .type $INSTALL_DIR/crc-bundle-info.json) -ADDITIONAL_PACKAGES="cloud-init" +ADDITIONAL_PACKAGES="cloud-init gvisor-tap-vsock-gvforwarder" case ${BUNDLE_TYPE} in microshift) @@ -104,9 +104,6 @@ EOF # Add gvisor-tap-vsock service ${SSH} core@${VM_IP} 'sudo bash -x -s' <