I successfully installed and initialized LXD on CentOS 8.
But, I am not able to run lxc commands as a non root user. Seems to be permission issue. Thoughts?
$ lxc list
If this is your first time running LXD on this machine, you should also run: lxd init
To start your first container, try: lxc launch ubuntu:18.04
Error: Get http://unix.socket/1.0: dial unix /var/snap/lxd/common/lxd/unix.socket: connect: permission denied
$
Just now, I removed LXD (purged), restarted system and installed LXD again. This time v3.19 (up from v3.18). I also added /snap soft link, that I missed earlier.
Now when I create container, IPV4 address isn’t assigned. I think I have encountered that issue in the past. hmmm
The lxc client needs access to the LXD Unix socket.
Run the following. Here, the group is lxd, and has rw- access to the socket.
$ ls -l /var/snap/lxd/common/lxd/unix.socket
srw-rw---- 1 root lxd 0 Jan 23 20:24 /var/snap/lxd/common/lxd/unix.socket
Therefore, if you get again Permission denied, please post both the output of groups and ls -l /var/snap/lxd/common/lxd/unix.socket.
Regarding the removal and reinstallation of LXD, as a snap package. If you use a loop file for the storage of the containers, then I think the removal of the snap package would remove the loop file as well. But if you use a dedicated partition or disk, then these are not removed.
There is no purging with snap packages.
Regarding the IPv4 IP addresses, I can guess that the port 53 was not freed when you initially removed the snap package, so when you installed again, dnsmasq from LXD could not start. At this point, this is a theory. If you are OK to reinstall, can you please reboot before installing LXD again?