# Rancher in VM with multiple NICs

**URL:** <https://forums.suse.com/t/rancher-in-vm-with-multiple-nics/13515>\
**Category:** SUSE Rancher Prime\
**Created:** [March 1, 2019, 12:19pm UTC](https://forums.suse.com/t/rancher-in-vm-with-multiple-nics/13515 "2019-03-01T12:19:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel.kovacs](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@daniel.kovacs](https://forums.suse.com/u/daniel.kovacs)\
**Post date:** [March 1, 2019, 12:19pm UTC](https://forums.suse.com/t/rancher-in-vm-with-multiple-nics/13515/1 "2019-03-01T12:19:39Z")

</div>

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](https://xxxx.xxx.net) --token \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* --ca-checksum d2115972e3d06c4320b02fb3099184b7b0d10ed30a471a67c14cab2dc25a7e21 --etcd --controlplane

Thank you.

---

<div class="post-metadata">

**Author:** ![marksnelling](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/marksnelling/32/5105_2.png) [@marksnelling](https://forums.suse.com/u/marksnelling)\
**Post date:** [April 22, 2019, 7:41pm UTC](https://forums.suse.com/t/rancher-in-vm-with-multiple-nics/13515/2 "2019-04-22T19:41:22Z")

</div>

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