LXC / LXD / CentOS 7


Hyperlinks:

Steps/Useful:

  • Create container: lxc-create -n centos-test-v1 -t /usr/share/lxc/templates/lxc-centos --lxcpath=/var/lib/lxc/
  • Alter root password without running the container: chroot /var/lib/lxc/centos-test-v1/rootfs passwd
  • List containers:  lxc-ls
  • Status of container:  lxc-info --name centos-test-v1
  • Start container as deamon: lxc-start -n centos-test-v1 -d
  • List running containers: lxc-ls --active
  • Stop container: lxc-stop --name centos-test-v1 (add -k to kill the container)