updated commands to 2.x/3.x syntax.
--- a/lxc.rst Sun Jan 27 03:11:43 2019 +0200
+++ b/lxc.rst Tue Jan 29 00:11:34 2019 +0200
@@ -87,6 +87,10 @@
$ sudo lxc-create -t alpine -n alpine-3.7 -- -r 3.7
+Examples of destroying container::
+
+ $ sudo lxc-destroy --name $NAME
+
Each template has own options, which can be passed after ``--``. To get help on template specific
options run::
@@ -109,6 +113,7 @@
sudo lxc-create -t download -n alpine-edge -- -d alpine -r edge -a amd64
sudo lxc-create -t download -n debian-sid -- -d debian -r sid -a amd64
+ sudo lxc-create -t download -n ubuntu-bio -- --dist ubuntu --release bionic --arch amd64
Since LXC v3.0 sh-templates moved to separate project and only 4 are left supported::
@@ -134,22 +139,39 @@
LXC Container management
========================
-List available VMs::
+List available containers::
$ sudo lxc-ls
+ $ sudo lxc-ls --fancy
-Start VM::
+Show details about container::
+
+ $ sudo lxc-info --name $NAME
+
+Start container::
$ sudo lxc-start -n $NAME
-Safely stop VM (honoring init system)::
+Show boot process output during container start with ``-F``::
- $ sudo lxc-halt -n $NAME
+ $ sudo lxc-start -n $NAME -F
+ $ sudo lxc-start -n $NAME --foreground
-Urgently stop VM::
+Safely stop container (by default sends ``SIGPWR`` signal to container ``init`` process and waits 60
+sec and then send ``SIGKILL``)::
$ sudo lxc-stop -n $NAME
+To signal reboot (by default sends ``SIGINT`` signal to container ``init`` process)::
+
+ $ sudo lxc-stop -n $NAME -r
+ $ sudo lxc-stop -n $NAME --reboot
+
+Urgently stop container (kills all processes)::
+
+ $ sudo lxc-stop -n $NAME -k
+ $ sudo lxc-stop -n $NAME --kill
+
Mark container to start on boot in ``/var/lib/lxc/$NAME/config``::
lxc.start.auto = 1