Containers are not showing when lxc list

hi,

when I execute lxc list Its not showing any containers .
root@cpu-5177:/var/lib/lxd# lxc list
±-----±------±-----±-----±-----±----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
±-----±------±-----±-----±-----±----------+

I have restarted both lxc and lxd services . but no luck
also in zfs list its showing the data sets

root@cpu-5177:/var/lib/lxd# zfs list
NAME USED AVAIL REFER MOUNTPOINT
default 225G 695G 19K none
default/containers 6.31G 695G 19K none
default/containers/vm613875 611M 9.40G 611M /var/lib/lxd/storage-pools/default/containers/vm613875
default/containers/vm615383 611M 9.40G 611M /var/lib/lxd/storage-pools/default/containers/vm615383
default/containers/vm617326 611M 9.40G 611M /var/lib/lxd/storage-pools/default/containers/vm617326
default/containers/vm619208 282M 9.72G 282M /var/lib/lxd/storage-pools/default/containers/vm619208
default/containers/vm619536 611M 9.40G 611M /var/lib/lxd/storage-pools/default/containers/vm619536
default/containers/vm624617 592M 9.42G 592M /var/lib/lxd/storage-pools/default/containers/vm624617
default/containers/vm624728 261M 9.74G 261M /var/lib/lxd/storage-pools/default/containers/vm624728
default/containers/vm627757 253M 9.75G 253M /var/lib/lxd/storage-pools/default/containers/vm627757
default/containers/vm630053 584M 9.43G 584M /var/lib/lxd/storage-pools/default/containers/vm630053
default/containers/vm631694 558M 9.45G 558M /var/lib/lxd/storage-pools/default/containers/vm631694
default/containers/vm631846 558M 9.45G 558M /var/lib/lxd/storage-pools/default/containers/vm631846
default/containers/vm633491 558M 9.45G 558M /var/lib/lxd/storage-pools/default/containers/vm633491
default/containers/vm634160 253M 9.75G 253M /var/lib/lxd/storage-pools/default/containers/vm634160
default/containers/vm637579 120M 9.88G 253M /var/lib/lxd/storage-pools/default/containers/vm637579
default/custom 218G 695G 19K none
default/custom/referenc

also storage pool got disappeared
root@cpu-5176:~# lxc storage list
±-----±------------±-------±-------±--------+
| NAME | DESCRIPTION | DRIVER | SOURCE | USED BY |
±-----±------------±-------±-------±--------+

could anyone help me on this please ?

What does which lxc show you?

hi,

root@cpu-5177:~# which lxc
/root/go/bin/lxc

I am getting this as I have complied manually for 3.8 version

You ran this command on a different system though, the problem you showed above was on cpu-5176 but you ran which on cpu-5177.

I’m trying to make sure that the lxc commands your ran above were all indeed running against the lxd daemon that’s backing /var/lib/lxd as most cases of the tool showing you nothing is due to querying a secondary local or remote LXD daemon.

I have the same problem with lxd on maas , maas shows bunch of LXD (POD) but when I log into the lxd host and run lxc list , it shows nothing .

The lxd host deployed with maas

My issue was related to a mistake that I have made. Actually I have provisioned the server with kvm (virsh) instead of lxd vms.

I got tripped up by the same thing with my home lab. In MAAS, did you create the VM under a new project? When you run lxc, it’ll default to the project “default”.

root@ubuntu:/var/snap/lxd/common/lxd/logs# lxc list
+------+-------+------+------+------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+-------+------+------+------+-----------+

root@ubuntu:/var/snap/lxd/common/lxd/logs# lxc project list
+---------------+--------+----------+-----------------+----------+-------------------------+---------+
|     NAME      | IMAGES | PROFILES | STORAGE VOLUMES | NETWORKS |       DESCRIPTION       | USED BY |
+---------------+--------+----------+-----------------+----------+-------------------------+---------+
| ARM (current) | NO     | YES      | NO              | NO       | Project managed by MAAS | 2       |
+---------------+--------+----------+-----------------+----------+-------------------------+---------+
| default       | YES    | YES      | YES             | YES      | Default LXD project     | 3       |
+---------------+--------+----------+-----------------+----------+-------------------------+---------+

root@ubuntu:/var/snap/lxd/common/lxd/logs# lxc project switch ARM
root@ubuntu:/var/snap/lxd/common/lxd/logs# lxc list
+-------------+---------+-------------------+------+-----------------+-----------+
|    NAME     |  STATE  |       IPV4        | IPV6 |      TYPE       | SNAPSHOTS |
+-------------+---------+-------------------+------+-----------------+-----------+
| Frustration | RUNNING | 172.16.0.4 (eth0) |      | VIRTUAL-MACHINE | 0         |
+-------------+---------+-------------------+------+-----------------+-----------+