Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I set VirtualBox VM options using docker-machine?

Using boot2docker it is easy to set some VirtualBox VM options while initializing the VM like:

boot2docker --disksize=50000 --memory=4096 ...

Since the new state of the art is to create those VMs using docker-machine my question is: How can I pass those options to docker-machine while creating a new one with:

docker-machine create -d virtualbox test
like image 720
Henrik Sachse Avatar asked Dec 20 '25 20:12

Henrik Sachse


1 Answers

If you run docker-machine create --help you can see the options that you can pass when creating the VM. In the case of the VirtualBox driver, this includes:

--virtualbox-cpu-count "1"          number of CPUs for the machine (-1 to use the number of CPUs available) [$VIRTUALBOX_CPU_COUNT]
--virtualbox-disk-size "20000"      Size of disk for host in MB [$VIRTUALBOX_DISK_SIZE]
--virtualbox-hostonly-cidr "192.168.99.1/24"    Specify the Host Only CIDR [$VIRTUALBOX_HOSTONLY_CIDR]
--virtualbox-memory "1024"          Size of memory for host in MB [$VIRTUALBOX_MEMORY_SIZE]
like image 109
Adrian Mouat Avatar answered Dec 23 '25 09:12

Adrian Mouat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!