I migrated from Ubuntu 17.10 --> 18.04. LXD 2.21 --> 3.1. While creating profile using my config (that worked well with LXD v2.21) I get following error: Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket: connect: no such file or directory
Following is my config info: Not sure what may have changed. Interestingly it worked well with my first migration (@ month back) on other machine Ubuntu 18.04 and LXD v3.0. Thoughts?
That error message means that the LXD client (the lxc command) is unable to find a running LXD service.
In most cases relating to a LXD upgrade to the snap package, this has to do with the lxc command from the previous LXD installation. That is, most likely you are running the old lxc client instead of the new one from the snap package.
To verify, run
which lxc
It should say /snap/bin/lxc for the new snap package.
If indeed you get /snap/bin/lxc but still get the error, then the LXD service is not running.
Thanks @simos I am able to init LXD successfully with default storage, network. profile, container with default profile. Not sure if this issue is related with config parameters.
Following is the output based on your suggestions:
I think I found reason behind this issue. Plugin that I am using is pointing to older location and hence this error. New path is: /var/snap/lxd/common/lxd/unix.socket
What happened here is that you have installed LXD twice on your systems.
First the DEB package, and then the SNAP package.
By doing this symlink, you are using the client software of the DEB package with the server LXD software from the snap package. Most likely, you are running the LXD 3.0 client software with the LXD 4.0 server software, which might cause issues and certainly you miss out of features of the LXD 4.0 client.
What you need to do, is remove the LXD 3.0 (DEB) client so that the client of the LXD 4.0 snap package is not masked any more.