Rancher in VM with multiple NICs

Hello

I’ve a 3 node KVM cluster and I like to deploy a k8s cluster with rancher.
Every VM has 2 NIC. The first is configured by DHCP and accesiable from the VM’s run in the same host. The second NIC has static IP and can be accessed from every VM. I ran into a problem when I add nodes to the cluster. The problem is, that only one node which is hosted by the rancher server’s VM host can be added. I realized that it detects the VM host only IP as a public IP. I tried to set the public IP when I start the rancher-agent but I’ve got the same error. I can ping all of the nodes from the rancher server, so the networking has no problems.

How can I run rancher-agent in VM that I have more than one NIC?

I tried to add nodes with this command:
sudo docker run -d -e CATTLE_ADDRESS=x.x.x.x --privileged --restart=unless-stopped --net=host -v /etc/kubernetes:/etc/kubernetes -v /var/run:/var/run rancher/rancher-agent:v2.1.6 --server https://xxxx.xxx.net --token ************************************* --ca-checksum d2115972e3d06c4320b02fb3099184b7b0d10ed30a471a67c14cab2dc25a7e21 --etcd --controlplane

Thank you.

Did you manage to solve this? I’m having a similar issue.