lxc

LXC is Linux Container, allows you to run lightweight virtual servers on your computer.

It is better use LXD instead of LXC. LXD provides a much easier-to-use interface to LXC.

To install lxc, run

Advertisement

apt install -y lxc

To create a VM, use

lxc-create -t download -n first-vm

To list VM, use the command lxc-ls

root@UNUSED:~# lxc-ls
first-vm
root@UNUSED:~# lxc-ls -f
NAME     STATE   AUTOSTART GROUPS IPV4      IPV6 UNPRIVILEGED
first-vm RUNNING 0         -      10.0.3.26 -    false
root@UNUSED:~#

To start a VM, run

lxc-start VM_NAME

To login to a VM, run

lxc-attach VM_NAME

lxc config files

/etc/lxc/default.conf
/etc/lxc/lxc-usernet
/var/lib/lxc
Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement