updated commands to 2.x/3.x syntax.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 29 Jan 2019 00:11:34 +0200
changeset 2346 f644e8d27cd2
parent 2345 cb168a3d27ec
child 2347 26666adc0987
updated commands to 2.x/3.x syntax.
lxc.rst
--- 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