User Tools

Site Tools


lxd:index

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lxd:index [2018/07/17 17:57]
adyxax
lxd:index [2018/09/25 15:00] (current)
Line 1: Line 1:
 ====== LXD ====== ====== LXD ======
  
-===== Installation using snapd =====+===== Procedures ​=====
  
-==== Centos7 ==== +  * [[.:install]] 
- +  ​* [[.:add_container]]
-First we install snap : +
-<​code>​ +
-yum install yum-plugin-copr epel-release +
-yum copr enable ngompa/​snapcore-el7 +
-yum install snapd +
-systemctl enable --now snapd.socket +
-</​code>​ +
- +
-Then we need to activate kernel features necessary for lxc by adding the following to ''/​etc/​default/​grub''​ in GRUB_CMDLINE_LINUX ​: +
-<​code>​ +
-user_namespace.enable=1 namespace.unpriv_enable=1 user.max_user_namespaces=3883 +
-</​code>​ +
- +
-Then we rebuild grub.conf, set a required sysctl and reboot : +
-<​code>​ +
-grub2-mkconfig >/​boot/​grub2/​grub.cfg +
-echo "​user.max_user_namespaces=3883"​ > /​etc/​sysctl.d/​99-userns.conf +
-reboot +
-</​code>​ +
- +
-After rebooting we can install ​and test lxd : +
-<​code>​ +
-snap install lxd +
-lxd init  # don't create network or storage here +
-lxc network create lxdbr0 ipv4.address=172.16.3.1/​24 ipv6.address=none ipv4.nat=false +
-lxc network attach-profile lxdbr0 default +
-lxc storage create local dir +
-lxc profile device add default root disk path=/ pool=local +
-lxc launch images:alpine/3.8 test +
-</​code>​ +
- +
-==== Ubuntu ==== +
- +
-Snapd is installed and enabled by default, as are the kernel features required to run lxc, so we just run : +
-<​code>​ +
-snap install lxd +
-lxd init  # don't create network or storage here +
-lxc network create lxdbr0 ipv4.address=172.16.3.1/​24 ipv6.address=none ipv4.nat=false +
-lxc network attach-profile lxdbr0 default +
-lxc storage create local dir +
-lxc profile device add default root disk path=/ pool=local +
-lxc launch images:​alpine/​3.8 test +
-</​code>​+
lxd/index.txt · Last modified: 2018/09/25 15:00 (external edit)