Closed diashtrih closed 3 years ago
sudo lxd init, is same
The LXD_SOCKET environment variable must be set to /run/lxd.socket
. By default this is achieved by sourcing /etc/profile.d/lxd.sh
. If this file is missing or your shell or application is not loading it, you must manually set the variable.
$ lxc list
Error: Get "http://unix.socket/1.0": dial unix /var/lib/lxd/unix.socket: connect: no such file or directory
$ cat /etc/profile.d/lxd.sh
# /etc/profile.d/lxd.sh - Set LXD socket path
LXD_SOCKET=/run/lxd.socket
export LXD_SOCKET
$ . /etc/profile.d/lxd.sh
$ lxc list
+------+-------+------+------+------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+-------+------+------+------+-----------+
Btw, this is also described in the wiki: Getting started with LXD on Fedora page.
error if run "sudo lxс list"not from root account