File tree 1 file changed +26
-2
lines changed
1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -97,10 +97,34 @@ if podman manifest inspect quay.io/crcont/routes-controller:${OPENSHIFT_VERSION}
97
97
image_tag=${OPENSHIFT_VERSION}
98
98
fi
99
99
100
+ # create the tap device interface with specified mac address
101
+ # this mac address is used to allocate a specific IP to the VM
102
+ # when tap device is in use.
103
+ ${SSH} core@${VM_IP} ' sudo bash -x -s' << EOF
104
+ nmcli connection add type tun ifname tap0 con-name tap0 mode tap autoconnect yes 802-3-ethernet.cloned-mac-address 5A:94:EF:E4:0C:EE
105
+ EOF
106
+
107
+
100
108
# Add gvisor-tap-vsock service
101
109
${SSH} core@${VM_IP} ' sudo bash -x -s' << EOF
102
- podman create --name=gvisor-tap-vsock --privileged --net=host -v /etc/resolv.conf:/etc/resolv.conf -it quay.io/crcont/gvisor-tap-vsock:latest
103
- podman generate systemd --restart-policy=no gvisor-tap-vsock > /etc/systemd/system/gvisor-tap-vsock.service
110
+ podman create --name=gvisor-tap-vsock quay.io/crcont/gvisor-tap-vsock:latest
111
+ podman cp gvisor-tap-vsock:/vm /usr/local/bin/
112
+ podman rm gvisor-tap-vsock
113
+ tee /etc/systemd/system/gvisor-tap-vsock.service <<ETE
114
+ [Unit]
115
+ Description=gvisor-tap-vsock traffic forwarder
116
+ Wants=network-online.target
117
+ After=network-online.target
118
+
119
+ [Service]
120
+ Restart=on-failure
121
+ TimeoutStopSec=70
122
+ ExecStart=/usr/local/bin/vm -preexisting -debug
123
+
124
+ [Install]
125
+ WantedBy=default.target
126
+ ETE
127
+
104
128
systemctl daemon-reload
105
129
systemctl enable gvisor-tap-vsock.service
106
130
EOF
You can’t perform that action at this time.
0 commit comments