LXD isn't working with juju on localhost cloud

i have deployed juju controller using bootstrap on localhost, but ‘lxc list’ is not showing any info about the controller i have made instead it gives nothing. seems like juju is not able to connect with lxd cloud ! i have tried all the possible solutions and now i am stuck here badly. kindly help me to resolve this issue ?

output of “lxc list”

±-----±------±-----±-----±-----±----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
±-----±------±-----±-----±-----±----------+

output of “juju controllers”

Controller Model User Access Cloud/Region Models Machines HA Version
lxd-test* default admin superuser localhost/localhost 2 1 none 2.4.4

You may have two versions of LXD installed somehow (deb & snap) which could explain the output, or you may also have your CLI configured to look at remote system, please post:

  • lxc remote list
  • which lxc
  • dpkg -l | grep lxd
  • snap list

=> Sir, The output of the following are,

“lxc remote list”
±----------------±-----------------------------------------±--------------±----------±-------±-------+
| NAME | URL | PROTOCOL | AUTH TYPE | PUBLIC | STATIC |
±----------------±-----------------------------------------±--------------±----------±-------±-------+
| images | https://images.linuxcontainers.org | simplestreams | | YES | NO |
±----------------±-----------------------------------------±--------------±----------±-------±-------+
| local (default) | unix:// | lxd | tls | NO | YES |
±----------------±-----------------------------------------±--------------±----------±-------±-------+
| ubuntu | https://cloud-images.ubuntu.com/releases | simplestreams | | YES | YES |
±----------------±-----------------------------------------±--------------±----------±-------±-------+
| ubuntu-daily | https://cloud-images.ubuntu.com/daily | simplestreams | | YES | YES |
±----------------±-----------------------------------------±--------------±----------±-------±-------+

=> “which lxc”
/usr/bin/lxc

=> “dpkg -l | grep lxd”

ii lxd 3.0.1-0ubuntu1~18.04.1 amd64 Container hypervisor based on LXC - daemon
ii lxd-client 3.0.1-0ubuntu1~18.04.1 amd64 Container hypervisor based on LXC - client

=> “snap list”

Name                  Version    Rev   Tracking  Publisher   Notes
core                  16-2.35.4  5662  stable    canonical✓  core
gnome-3-26-1604       3.26.0     74    stable/…  canonical✓  -
gnome-calculator      3.30.0     238   stable/…  canonical✓  -
gnome-characters      3.30.0     139   stable/…  canonical✓  -
gnome-logs            3.30.0     45    stable/…  canonical✓  -
gnome-system-monitor  3.30.0     57    stable/…  canonical✓  -
gtk-common-themes     0.1        701   stable/…  canonical✓  -
juju                  2.4.4      5426  stable    canonical✓  classic
lxd                   3.6        9354  stable    canonical✓  -
pycharm-community     2018.2.4   85    stable    jetbrains✓  classic
vlc                   3.0.4      555   stable    videolan✓   -

Yeah, you have both the LXD deb and snapped installed, so that matches the symptoms.
Since there’s nothing running on the deb version of LXD, removing the lxd and lxd-client debs should fix your setup.

Got it sir! and yes you are right, i have been using 2 packages of lxd. i just completely removed lxd and lxd client and also removed its snap package and again installed with “sudo apt install lxd”, i think it installs lxd deb. and now its working fine. Thanks so much