Changes

Jump to: navigation, search

Docker

2,673 bytes added, 21:39, 22 June 2018
Create machine
Most simple usage:
<pre>
docker-machine create -d <hybervisor driver name> --<driver options> <machine name>
</pre>
* The default value of the driver parameter is "virtualbox".  '''docker-d: machine''' can create VMs on the local host and on remote clouds. Always the chosen driver determines where and how the machine will be created. The guest operating system that is being installed on the new machine is also determined by the hypervisor driver. Default value: E.g. with the "virtalboxvirtualbox"driver you can create machines locally using the boot2docker as the guest OS.  The driver also determines the virtual network types and interfaces types that are created inside the machine. E.g. the KVM driver creates two virtual networks (bridges), one host-global and one host-private network, and name of the host-private network is hardcoded.  In the '''docker-machine create''' command, the driver options are also determined by the driver. You always has to check the available options at the provider of driver. For cloud drivers typical options are the remote url, the login name and the password. Some driver allows to change the guest OS, the CPU number or the default memory.  Here is a complete list of the currently available drivers: https://github.com/docker/docker.github.io/blob/master/machine/AVAILABLE_DRIVER_PLUGINS.md  ===KVM usedriver=== Here is the KVM driver home page: https: "//github.com/dhiltgen/docker-machine-kvm Minimum Parameters: * --driver kvm". :
* --kvm-network: The name of the kvm virtual (public) network that we would like to use. If this is not set, the new machine will be connected to the '''"default"''' KVM virtual network.
{{note|Docker will always create '''Images''':<br>By default docker-machine-kvm uses a second, isolated virtual network (bridge), called "boot2docker.iso as guest os for the kvm hypervisior. It's also possible to use every guest os image that is derived from boot2docker.iso as well. For using another image use the --kvm-boot2docker-url parameter. '''Dual Network''':<br>* '''eth1'''- A host private network called docker-machinesis automatically created to ensure we always have connectivity to the VMs. The docker-machine ip command will always return this IP address which is only accessible from your local system.* '''eth0'"'' - You can specify any libvirt named network. If you don't specify one, that all the VMs "default" named network will be connected used.If you have exotic networking topolgies (openvswitch, etc.), you can use virsh edit mymachinename after creation, modify the first network definition by hand, then reboot the VM for the changes to regardless of take effect.Typically this would be your "public" network accessible from external systemsTo retrieve the value IP address of this network, you can run a command like the following:docker-machine ssh mymachinename "ip -one -4 addr show dev eth0|cut -f7 -d'''" Driver Parameters:<br>*--kvm-network''' paramter that controls only cpu-count Sets the name of used CPU Cores for the "public" networkKVM Machine. Defaults to 1 . It seems *--kvm-disk-size Sets the kvm machine Disk size in MB. Defaults to 20000 .*--kvm-memory Sets the name Memory of the isolated virtual kvm machine in MB. Defaults to 1024.*--kvm-network Sets the Network of the kvm machinee which it should connect to. Defaults to default.*--kvm-boot2docker-url Sets the url from which host the image is hardcoded, and canloaded. By default it't be changeds not set.*--kvm-cache-mode Sets the caching mode of the kvm machine. Defaults to default. }}*--kvm-io-mode-url Sets the disk io mode of the kvm machine. Defaults to threads.
===Create machine with KVM===
<pre>
# docker-machine create -d kvm --kvm-network "docker-network" manager

Navigation menu