-
Notifications
You must be signed in to change notification settings - Fork 2k
[Feature Request] Specify a static IP for VirtualBox VMs #1709
Comments
+1, need this feature |
+1 |
1 similar comment
+1 |
+1 |
Here's a good workaround. Add the following to your
|
@letsgolesco you can use By default, seems docker-machine picks one randomly, so forced to use the one for
Cheers. |
@luislavena - Unfortunately that did not work. |
+1 Def need this feature though! |
@krinkere not sure your env, but this worked for my OSX installation by doing that, but failed when using machine on Linux, which required tweaks to dhcpserver configuration of $ VBoxManage dhcpserver modify --ifname vboxnet0 --disable
$ VBoxManage dhcpserver modify --ifname vboxnet0 --ip 192.168.59.3 --netmask 255.255.255.0 --lowerip 192.168.59.103 --upperip 192.168.59.203
$ VBoxManage dhcpserver modify --ifname vboxnet0 --enable
$ docker-machine create --driver "virtualbox" --virtualbox-cpu-count "-1" --virtualbox-disk-size "30000" --virtualbox-memory "2560" --virtualbox-hostonly-cidr "192.168.59.3/24" dev This is, as you can see, a huge hack 😸, but works for now 😄 |
Would love to see this feature!! |
@luislavena - Thanks for your response Here is what I get on my Mac. $ docker-machine create --driver virtualbox --virtualbox-hostonly-cidr "192.168.99.3/24" dev $ docker-machine ip dev While I do have ip in the right subnet, it is not the IP that I would want to use... Def would love to see this feature |
+1 usefull feature |
+1 This feature would really help us out! We use docker-machine to run a local Elasticsearch cluster and we have |
+1 |
9 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 (y) |
+1 |
1 similar comment
+1 |
+1 |
I'm all for spamming the subscribers.
Some of those subscribers are part of the project team.
…On 26 Jan 2017 14:20, "Sergey Nevmerzhitsky" ***@***.***> wrote:
No need to spam the subscribers.
You can unsubscribe.
[image: 1]
<https://cloud.githubusercontent.com/assets/1006042/22332699/4cf1a8b4-e3e3-11e6-8bad-52406c3b8055.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1709 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AG44NZ2KdnsH6JTU6iI_5Uieh9WZxWXBks5rWJ2RgaJpZM4FsQYg>
.
|
Maintainer checking in. Please do not do spam the issue with +1 comments. This is a well known issue and spamming the thread doesn't do any good. Indicate support through the "+1" emoji reactions if you'd like. As always, we're happy to evaluate pull requests or detailed proposals. Thanks all. (As a side note, @twang2218 seems to have the right idea generally -- static IPs are trickier than they look to get right and hit the use cases subscribers to this thread might have in mind -- perhaps an issue could be started in the boot2docker repo to discuss.) |
I do not really want a static ip. But once the ip address is picked during creation, it should keep it on subsequent restarts. Is this already available? |
I had a docker with VPN and the standard 192.168.99.100 wasn't loading. I figured this was because of the VPN connection, so I setup a bridge network inside Virtualbox to access the docker via 192.168.1.159. I would like this to show up on Kitematic's published IP address. Is there any way to do so? |
For those who can not wait this feature to be implemented, assigning custom ip, plus custom cpu/memory is possible by using Vagrant VirtualBox provider and docker-machine generic driver. For example in windows, place this Vagrantfile: Vagrant.configure("2") do |config|
config.vm.box = "AlbanMontaigu/boot2docker"
config.vm.provider "virtualbox" do |v|
v.memory = 8192
v.cpus = 8
end
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "C:/Users", "/c/Users"
config.vm.network "private_network", ip: "192.168.99.103"
end and place vagrant default ssh private key with name and run
and you'll get docker host with custom ip, cpu, memory etc configured via vagrant at the same time accessible via docker-machine. You can find working file set for Windows in https://github.com/joelhandwell/dockerhost |
@jcwilson Hi Josh et al, thanks a lot.. I forked your script in order to fix the same issue (see minishift/minishift#343 , minishift/minishift#598) in combination with minishift: https://github.com/ahilbig/docker-machine-ipconfig |
Any news? |
Currently, I am experimenting with this for Minishift: minishift/minishift#1293 |
+1.
This forces you to regenerate certificates or disable all machines and restore order of executing (what sometimes can be painful, too). Additionally, using Chef to configure Docker-based project would also be much better if you could assume created machine would have always the same IP (for example, adding it to hosts file and you could forget about IPs). |
+1 |
1 similar comment
+1 |
+1 bye. |
+1 |
As part of minishift, we have implemented minishift/minishift#1316 and this has been working well so far. We are now looking into alternatives to do the same for the other hypervisors over time, but first we will fix the address using minishift/minishift#1457 (to prevent a new address from being assigned). We haven't been able to reserve time yet, we are going to land this in minikube too. |
+1 |
The simplest workaround which I found is to rely on sequence of starting virtual machines by doker-machine. VirtualBox has DHCP server which starts assigning IP adresses from 192.168.99.100.
Notice that |
+1 |
when i run |
This functionality has been added to Minishift spome time ago, but it
needs a modification to the ISO to function.
On Hyper-V we ran into issues that the boot2docker image does not
played nicely... so it only worked on CentOS and Fedora based images.
Also, this does not work with the current KVM driver as it relies on DHCP.
This would need a slight redesign...
…On Sun, Feb 3, 2019 at 11:08 PM fcying ***@***.***> wrote:
when i run docker-machine.exe start, it takes more than 15 sec for DHCP waiting for an IP(if internet is broken, it takes more than 2minutes), i think if can set a static ip, it can boot fast.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
--
Gerard Braad | http://gbraad.nl
[ Doing Open Source Matters ]
|
Sometimes I had to kill VBoxNetDHCP.exe process on Windows, to make vbox assign IPs starting from 192.168.99.100 |
👍 |
It would really make my life easier. |
It's very useful. |
In order to assign a
My environment is OSX, VirtualBox (boot2docker.iso) Hoping this can be useful 🙂 |
Yes, there is an option to create with specific ip. All you need to do is specify ip/ip-range with For example:
|
If you issue is that you have to keep updating your host file you can just install Avahi on your container and use mDSN. |
It will be very useful to activate this feature to able to assign static ip address while creating vm using docker-machine |
Hi, I've been searching through the docs and issues to figure this out but can't find an answer.
Basically, I want to be able to specify the IP address of a VM (i.e. the value that's listed under "URL" in
docker-machine ls
) when I create it withdocker-machine create
.I want this because I've been relying on boot2docker's default address of 192.168.59.103, but now it varies from machine to machine.
Thanks!
The text was updated successfully, but these errors were encountered: