I having a problem with deleting container, I tried to stop, start, restart it. Nothing helps. Btw, the image or metadata in it is broken, because I spent 4 hours attempting to download debian iso with right metadata (my internet provider is hardly blocking incus while my vpn doesn’t work for wsl). I already found right image, but I can’t delete the old one.
root@LAPTOP-ROG:~# incus delete wazuh-server --force Error: Stopping the instance failed: The instance is already stopped root@LAPTOP-ROG:~# incus delete wazuh-server Error: The instance is currently running, stop it first or pass --force root@LAPTOP-ROG:~# incus list ±-------------±------±-----±-----±----------±----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | ±-------------±------±-----±-----±----------±----------+ | wazuh-server | ERROR | | | CONTAINER | 0 | ±-------------±------±-----±-----±----------±----------+ root@LAPTOP-ROG:~# incus stop wazuh-server Error: The instance cannot be cleanly shutdown as in Error status root@LAPTOP-ROG:~# incus start wazuh-server Error: The instance cannot be started as in Error status root@LAPTOP-ROG:~# incus restart wazuh-server Error: The instance cannot be cleanly shutdown as in Error status root@LAPTOP-ROG:~# incus delete wazuh-server --force Error: Stopping the instance failed: The instance is already stopped root@LAPTOP-ROG:~# incus list ±-------------±------±-----±-----±----------±----------+ | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | ±-------------±------±-----±-----±----------±----------+ | wazuh-server | ERROR | | | CONTAINER | 0 | ±-------------±------±-----±-----±----------±----------+ root@LAPTOP-ROG:~#
Thank you, I found the solution:
root@LAPTOP-ROG:~# rm -rf /var/lib/incus/*
rm: cannot remove ‘/var/lib/incus/guestapi’: Device or resource busy
rm: cannot remove ‘/var/lib/incus/shmounts’: Device or resource busy
root@LAPTOP-ROG:~# systemctl stop incus
Stopping ‘incus.service’, but its triggering units are still active:
incus.socket
root@LAPTOP-ROG:~# systemctl stop incus.socket
root@LAPTOP-ROG:~# rm -rf /var/lib/incus/*
root@LAPTOP-ROG:~# incus list
Error: The incus daemon doesn’t appear to be started (socket path: /var/lib/incus/unix.socket)
root@LAPTOP-ROG:~# systemctl start incus
root@LAPTOP-ROG:~# incus list
±-----±------±-----±-----±-----±----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
±-----±------±-----±-----±-----±----------+
root@LAPTOP-ROG:~#