V11.2 Virtual Machine Static IPs

Status
Not open for further replies.

Binary Buddha

Contributor
Joined
Mar 6, 2016
Messages
126
Anybody know how to assign the Docker Host VM a static IP?

In the 9.10 I could assign the IP in the VM config.
 

Binary Buddha

Contributor
Joined
Mar 6, 2016
Messages
126
Which version are you on now?

I jumped over to the newly released 11.2. But, when I posted the question it was with the 11.2 RC.
 
D

dlavigne

Guest
I see, 11.1 gave a prompt where you could type in the IP. 11.2 does not, neither does it provide a field in the NIC device screen where you can set it. Please create a bug about this at bugs.freenas.org and post the issue number here.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
I see, 11.1 gave a prompt where you could type in the IP. 11.2 does not, neither does it provide a field in the NIC device screen where you can set it. Please create a bug about this at bugs.freenas.org and post the issue number here.

That's not correct. In FN11.1 using the old ui you could assign a mac address to the NIC but not an IP address.

It's always been the case that to assign a static address to a "docker vm" you have to use ros command and/or a cloud-config.yaml file within the "docker vm" itself. e.g: https://rancher.com/docs/os/v1.2/en/networking/interfaces/

Even then, the boot messages/logs will show the the "docker vm" will consume a DHCP lease every time it is booted before the static IP is applied.

P.S. Was there ever a web UI for "docker vm" in version 9.10? I seem to remember it was CLi only with iohyve.
 

Binary Buddha

Contributor
Joined
Mar 6, 2016
Messages
126
That's not correct. In FN11.1 using the old ui you could assign a mac address to the NIC but not an IP address.

It's always been the case that to assign a static address to a "docker vm" you have to use ros command and/or a cloud-config.yaml file within the "docker vm" itself. e.g: https://rancher.com/docs/os/v1.2/en/networking/interfaces/

Even then, the boot messages/logs will show the the "docker vm" will consume a DHCP lease every time it is booted before the static IP is applied.

P.S. Was there ever a web UI for "docker vm" in version 9.10? I seem to remember it was CLi only with iohyve.

Docker VM didn't technically exist in 9.10 like it does in 11.

At the moment, my main concern is it using a different MAC than the primary interface. I can temp a Reserved DHCP address to the MAC. I am having the same issue where using the ros didn't stick a static IP that I gave to it.

Not being able to set a Static IP via the FreeNAS VM config interface sort of makes sense. How does FreeBSD know how to tell a VM of a different OS what it's IP address is since it's a "software" config not a virtual hardware thing.

I'm fairly certain the ros thing is due to file permissions not being able to write to the config somewhere. However since it linux based, one could just install Docker on another VM OS and install the Rancher container. Not entirely certain what's special with this RancherOS thing.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Not entirely certain what's special with this RancherOS thing.

It was ixsystems answer to getting docker support in FreeNAS 11 onwards, whether it's a good fit for a home user wishing to use a few docker apps is another question. Perhaps, using docker + portainer/rancherUI in a linux vm of your preferred flavour will enable you to do what you want.
 

Binary Buddha

Contributor
Joined
Mar 6, 2016
Messages
126
...Perhaps, using docker + portainer/rancherUI in a linux vm of your preferred flavour will enable you to do what you want.

LOL... The Docker VM is RancherOS based off Linux not something else. So I'm politely disagreeing. I think it's ixsystems making docker support for an average home user. Enterprise-wise, most would be more inclined to do as I proposed on a RedHat VM.

Aside from being a push-button "most likely will work" solution for the less technically experienced or comfortable, I don't really see the benefits.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
You seem to have got what I was saying back to front. Yes it s push-button solution for the less experienced, but is RancherUI a system now developed for large scale kubernetes deployment, orchestration and development of containers really a good fit for a home user who wants to run a few docker apps? The whole point is rancheros + RancherUI is for enterprise use as their website would have you believe.
 

Binary Buddha

Contributor
Joined
Mar 6, 2016
Messages
126

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
How I do it...

Under the VM, Devices, NIC, Edit.

Specify a MAC address (it's random on reboot otherwise)... I go to my DHCP server and just grab the one it's already using at first.

Reserve DHCP for that MAC address.

Restart the VM... everyone's happy.
 
Status
Not open for further replies.
Top