Greetings. I am attempting to teach myself how to use LXD so that I can run two web servers on the same machine (Nextcloud via apache2; PiHole via lighttd; PiHole will be in the container). Unfortunately, I have managed to totally fubar LXD on my system after just one test instance.
What had happened was I created a test container (Ubuntu 18.04) but wanted to give it a static IP. So I attempted to give it a static IP and it hung my system (my system, btw, is an Ubuntu Server 18.10). After that, nothing worked so I got it in my mind to follow the instructions here: How to initialize LXD again.
After following these instructions, I went to initialize INIT and got this:
``` matthew@optiplex3040:~$ sudo lxd --debug --group lxd DBUG[01-16|15:40:35] Connecting to a local LXD over a Unix socket DBUG[01-16|15:40:35] Sending request to LXD method=GET url=http://unix.socket/1.0 etag= ```
And … nothing. It just hung … for hours
So I killed the PID and then got this:
``` matthew@optiplex3040:~$ sudo lxd init Error: Failed to connect to local LXD: Get http://unix.socket/1.0: dial unix /var/snap/lxd/common/lxd/unix.socket: connect: connection refused ```
Grrrr.
Finally, ran
``` matthew@optiplex3040:~$ sudo lxd --debug --group lxd ```
after killing the PID and got this:
Of particular relevancy to my untrained eyes is this:
``` INFO[01-16|15:42:27] Initializing storage pools DBUG[01-16|15:42:27] Initializing and checking storage pool "PiHoleLXD" DBUG[01-16|15:42:27] Checking ZFS storage pool "PiHoleLXD" DBUG[01-16|15:42:27] ZFS storage pool "PiHoleLXD" does not exist, trying to import it EROR[01-16|15:42:27] Failed to start the daemon: ZFS storage pool "PiHoleLXD" could not be imported: cannot import 'PiHoleLXD': no such pool available ```
This is relevant because I deleted that pool as per the instructions in the link provided above.
I’m guessing that is the problem but have no idea how to fix it. I have attempted purge / reinstalls of lxd lxd-client and zfsutils-linux.
Any ideas?
Thank you!
Also, it as asked on Reddit but I believe I am using the SNAP version as it shipped with Ubuntu 18.10. In purging/reinstalling perhaps I’ve mixed apt with SNAP?