Hi,
lxc init images:debian/9 lxc4107 -p lxc4107
Will successfully create the container:
t=2019-09-09T22:46:01+0200 lvl=info msg=“Creating container” ephemeral=false name=lxc4107 project=default
t=2019-09-09T22:46:01+0200 lvl=info msg=“Created container” ephemeral=false name=lxc4107 project=default
lxc config show lxc4107
architecture: x86_64
config:
image.architecture: amd64
image.description: Debian stretch amd64 (20190909_05:24)
image.os: Debian
image.release: stretch
image.serial: “20190909_05:24”
image.type: squashfs
volatile.apply_template: create
volatile.base_image: 2afa412603c0deeebc2210e9b6b75b1861a664939d1cb2ce6d85cb89ea1343df
volatile.eth0.hwaddr: 00:16:3e:2e:60:4d
volatile.idmap.base: “0”
volatile.idmap.next: ‘[{“Isuid”:true,“Isgid”:false,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000},{“Isuid”:false,“Isgid”:true,“Hostid”:1000000,“Nsid”:0,“Maprange”:1000000000}]’
volatile.last_state.idmap: ‘[]’
devices:
root:
path: /
pool: local-filestorage
type: disk
ephemeral: false
profiles:
- lxc4107
stateful: false
description: “”
lxc profile show lxc4107
config: {}
description: “”
devices:
eth0:
host_name: lxc4107
name: eth0
nictype: bridged
parent: ovsbr
type: nic
root:
path: /
pool: local-filestorage
type: disk
name: lxc4107
used_by:
- /1.0/containers/lxc4107
Trying to delete it:
#lxc delete lxc4107 -f
Error: error removing /var/snap/lxd/common/lxd/storage-pools/local-filestorage/containers/lxc4107:
Log:
t=2019-09-09T23:19:30+0200 lvl=info msg=“Deleting container” created=2019-09-09T22:46:01+0200 ephemeral=false name=lxc4107 project=default used=1970-01-01T01:00:00+0100
t=2019-09-09T23:19:30+0200 lvl=eror msg=“Failed deleting container storage” err="error removing /var/snap/lxd/common/lxd/storage-pools/local-filestorage/containers/lxc4107: " name=lxc4107
#lxc --version
3.17
lxc storage list
±------------------±------------±-------±-------------------------------------±--------+
| NAME | DESCRIPTION | DRIVER | SOURCE | USED BY |
±------------------±------------±-------±-------------------------------------±--------+
| local-filestorage | | dir | /opt/storages/local-filestorage | 160 |
±------------------±------------±-------±-------------------------------------±--------+
ls -la /var/snap/lxd/common/lxd/storage-pools/local-filestorage
total 0
drwx–x--x 2 root root 6 Sep 9 23:10 .
drwx–x--x 3 root root 31 Aug 9 13:17 …
ls -la /opt/storages/local-filestorage
total 494466744
drwxr-xr-x 3 root root 4096 Sep 9 22:07 .
drwxr-xr-x 3 root root 31 Aug 9 13:16 …
drwxr-xr-x 83 root root 4096 Sep 9 21:49 containers
So, how to get rid of this container ?