7,540
edits
Changes
→Create the machine
Secondly we have to install the hypervisor driver for the docker-machine to be able to create, manage Virtual Machines running on the hypervisor. As we are going to use the KVM hypervisor, we have to install the "docker-machine-driver-kvm" driver:
{{warning|Fontos, hogy a 10-es verziójú KVM driver ami a CentOS7-hez való nem kompatibilis a Fedora 26-al. Én végül továbbra is a 7-es verziót használom, ez továbbra is jó}}
<pre>
# curl -Lo docker-machine-driver-kvm \
If the new VM was created with virtualbox driver, the VirtualBox graphical management interface must be started with the same user, that the VM was created with, and the VirtualBox will discover the new VM automatically}}
{{warning|A 18.9-es boot2docker nem kompatibilis a Fedora-s docker-machine-al, mert valamiért nem nem érzékeli, hogy az SSH már elindult (Waiting for SSH to be available...). Töltsük le a boot2docker_v18.06.1, és azzal már működik. A --kvm-boot2docker-url-el kell megadni a letöltött ISO-t. }}
<pre>
# docker-machine create -d kvm --kvm-network "docker-network" --kvm-boot2docker-url="/home/adam/Downloads/boot2docker/boot2docker-v18.05.0-ce.iso" --kvm-disk-size "5000" --kvm-memory "800" mg0
# docker-machine create -d kvm --kvm-network "docker-network" --kvm-boot2docker-url="/root/.docker/machine/cache/boot2docker_v18.06.1-ce.iso" --kvm-disk-size "5000" --kvm-memory "800" mg0
</pre>
===Use different OS===
Az operációs rendszert esősorban a driver típusa határozza meg. A KVM driver-hez alapértelmezetten a boot2docker OS tartozik. Azonban bármilyen más boot2docker alapú oprendszert is használhatunk. Az Amazon AWS driver használata esetén Ubuntu lesz az OS.
KVM driver esetén ha nem az alapértelmezett OS-t akarjuk használni, akkor a --kvm-boot2docker-url kapcsolóval kell megadni a .ISO helyét. Én a rancherOS-t próbáltam ki és működött. Innen lehet letölteni: https://github.com/rancher/os (közvetlen link: https://releases.rancher.com/os/v1.5.0/rancheros.iso)
<pre>
docker-machine create -d kvm --kvm-boot2docker-url "/home/adam/Downloads/rancheros.iso" --kvm-network "docker-network" manager1
</pre>
===Check what was created===
</pre>
<br>
Both bridges can send packages to any host on the same network(because it was created with "'''forward mode=nat'''", see [[KVM#Add new network]] for details). otherwise everything Everything else is rejected that was sent to or form the bridges (last four lines)
<pre>
-A FORWARD -i virbrDocker -o virbrDocker -j ACCEPT