Command line LXC and LXD in Ubuntu

This topic will talk about my study LXC and LXD on Ubuntu 20.04.2 LTS

1 Like

$ lxc list

    +-----------+---------+----------------------+---------------------------------------------+-----------+-----------+
    |   NAME    |  STATE  |         IPV4         |                    IPV6                     |   TYPE    | SNAPSHOTS |
    +-----------+---------+----------------------+---------------------------------------------+-----------+-----------+
    | ubuntuone | RUNNING | 10.17.101.174 (eth0) | fd42:796:bd79:bdd:216:3eff:feed:b366 (eth0) | CONTAINER | 0         |
    +-----------+---------+----------------------+---------------------------------------------+-----------+-----------+
    | ubuntutwo | RUNNING | 10.17.101.218 (eth0) | fd42:796:bd79:bdd:216:3eff:fe3e:459e (eth0) | CONTAINER | 0         |
    +-----------+---------+----------------------+---------------------------------------------+-----------+-----------+

$ lxc image list

    +-------+--------------+--------+---------------------------------------------+--------------+-----------------+----------+------------------------------+
    | ALIAS | FINGERPRINT  | PUBLIC |                 DESCRIPTION                 | ARCHITECTURE |      TYPE       |   SIZE   |         UPLOAD DATE          |
    +-------+--------------+--------+---------------------------------------------+--------------+-----------------+----------+------------------------------+
    |       | 72e36c2e7f82 | no     | ubuntu 20.04 LTS amd64 (release) (20210201) | x86_64       | VIRTUAL-MACHINE | 506.63MB | Feb 17, 2021 at 2:55pm (UTC) |
    +-------+--------------+--------+---------------------------------------------+--------------+-----------------+----------+------------------------------+
    |       | d1df9c150a9f | no     | ubuntu 20.04 LTS amd64 (release) (20210201) | x86_64       | CONTAINER       | 358.84MB | Feb 17, 2021 at 2:45pm (UTC) |
    +-------+--------------+--------+---------------------------------------------+--------------+-----------------+----------+------------------------------+

$ lxc remote list

    +-----------------+------------------------------------------+---------------+-------------+--------+--------+                                                                    
    |      NAME       |                   URL                    |   PROTOCOL    |  AUTH TYPE  | PUBLIC | STATIC |                                                                    
    +-----------------+------------------------------------------+---------------+-------------+--------+--------+                                                                    
    | images          | https://images.linuxcontainers.org       | simplestreams | none        | YES    | NO     |                                                                    
    +-----------------+------------------------------------------+---------------+-------------+--------+--------+                                                                    
    | local (default) | unix://                                  | lxd           | file access | NO     | YES    |                                                                    
    +-----------------+------------------------------------------+---------------+-------------+--------+--------+                                                                    
    | ubuntu          | https://cloud-images.ubuntu.com/releases | simplestreams | none        | YES    | YES    |                                                                    
    +-----------------+------------------------------------------+---------------+-------------+--------+--------+                                                                    
    | ubuntu-daily    | https://cloud-images.ubuntu.com/daily    | simplestreams | none        | YES    | YES    |                                                                    
    +-----------------+------------------------------------------+---------------+-------------+--------+--------+