I configured my Rancher instance on a VM in FreeNAS 11.1. At the time it was assigned an IP address of 192.168.1.13 by my DHCP. I created a host, and got a CrashPlan container up and running. Then my physical box rebooted due to a power failure, and now when I boot up, the Rancher instance has an IP address of 192.168.1.12. The host shows as Disconnected, and I cannot access my CrashPlan container. I’m thinking that if I re-assign this instance to ip address .13, the host may connect again and all will be well. (And once that is done, I will configure my DHCP server to reserve that IP Address for this machine).
But how do I do this? How do I configure my Rancher server to this new static IP Address?
Well something interesting has happened. In my FreeNAS GUI, I went to the VM’s tab, and stopped and restarted the VM on which Rancher is running.
It was again assigned IP address .12 by the DHCP, but this time, when I logged back into my rancher UI on port 8080, the Host showed as Connected, and I was able to manage my crashplan container again.
So I immediately configured my DHCP server to reserve address .12 for this VM’s MAC address. But I’d still like to know how to configure the rancher server to use a static IP instead of requesting one from the DHCP server (even though the mentioned address reservation should solve my problem going forward).
The server is a container, it has no control over the IPs on the machine you run it on.
If you are running RancherOS on that VM, http://rancher.com/docs/os/v1.2/en/networking/interfaces/
Fantastic. Thanks. I’m still busy getting to grips with rancheros vs rancher server.