User Tools

Site Tools


kvm_and_docker_on_one_host

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
kvm_and_docker_on_one_host [2019/07/26 16:48] herwarthkvm_and_docker_on_one_host [2020/04/12 09:10] (current) – [ZFS] herwarth
Line 198: Line 198:
  
 Now we have the rule added. Make it persistent. First install iptables-persistent Now we have the rule added. Make it persistent. First install iptables-persistent
-  apt install iptables-persistent.+  apt install iptables-persistent
 It will tell you it created rules in: /etc/iptables/rules.v4 and /etc/iptables/rules.v6. It will tell you it created rules in: /etc/iptables/rules.v4 and /etc/iptables/rules.v6.
 Check the rules.v4 file for the masquerade rule Check the rules.v4 file for the masquerade rule
Line 224: Line 224:
 # Completed on Fri Jul 26 18:19:47 2019 # Completed on Fri Jul 26 18:19:47 2019
 </code> </code>
 +====ZFS====
 +When you have a ZFS pool you want to use for storage
 +<code>
 +systemctl stop docker
 +rm -rf /var/lib/docker
 +zfs create -o mountpoint=/var/lib/docker data/docker
 +</code>
 +<code - /etc/docker/daemon.json>
 +{
 +  "storage-driver": "zfs",
 +  "iptables": false
 +}
 +</code>
 +<code>
 +systemctl start docker
 +</code>
 +Check with docker info
 +<code>docker info</code>
 +<code>
 +Client:
 + Debug Mode: false
  
 +Server:
 + Containers: 0
 +  Running: 0
 +  Paused: 0
 +  Stopped: 0
 + Images: 0
 + Server Version: 19.03.8
 + Storage Driver: zfs
 +  Zpool: data
 +  Zpool Health: ONLINE
 +  Parent Dataset: data/docker
 +  Space Used By Parent: 98304
 +  Space Available: 965292744704
 +  Parent Quota: no
 +  Compression: off
 +.
 +.
 +.
 +</code>
 ====Networks==== ====Networks====
 In our example we are not going to use containers in the routed subnet bridge called internet In our example we are not going to use containers in the routed subnet bridge called internet
kvm_and_docker_on_one_host.1564159680.txt.gz · Last modified: by herwarth