LXD is starting to exhaust my patience, After erasing LXD/snap completely and trying to do reinstall I get the infamous lxc list Error: Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket: connect: no such file or directory

After being down for many days and finding no way to get this server in cluster going. I decide to reinstall it from scratch.

snap remove lxd
snap remove lxc
sudo apt remove -y lxd
sudo apt autoremove
sudo zpool list
sudo apt purge lxd
dpkg --purge --force-all lxd
dpkg --reconfigure -a
sudo apt-get remove --purge snapd
sudo rm -rf /snap
sudo rm -rf /var/snap
rm -vf /etc/systemd/snap-.mount
rm -vf /etc/systemd/snap-
.service
rm -vf /etc/systemd/snap-*.service

Rebooted

and then did
apt install snap
apt install snapd
snap install lxd
lxc
lxc version
lxd init
lxc list

and of course I get this…
lxc info
Error: Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket: connect: no such file or directory

What the freak does this really mean. am I going to have waste another day rebuilding the server from scratch. Why doesn’t LXD work well with Ubuntu simple apt upgrade?
Why does apt upgrade break LXD?
Why is so freaking complicated to just reinstall this thing?
There is something wrong in how this software works if it requires you erase your server to update it.

apt remove --purge lxd-client

You still have the deb client installed which based on system PATH takes precedence over the snap.

OK, it is working
lxc cluster list
±-----±-------------------------±---------±-------±------------------+
| NAME | URL | DATABASE | STATE | MESSAGE |
±-----±-------------------------±---------±-------±------------------+
| MOE | https://64.71.77.32:8443 | YES | ONLINE | fully operational |
±-----±-------------------------±---------±-------±------------------+

lxc list

±-----±--------±-----±-----±-----------±----------±---------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | LOCATION |
±-----±--------±-----±-----±-----------±----------±---------+
| test | RUNNING | | | PERSISTENT | | MOE |
±-----±--------±-----±-----±-----------±----------±---------+

Looks like I forgot to setup lxbro

Any quick way to fix this?

Now I need get my old containers in there, I have them as full directories
What is best way to get them going? Worse case I can create new containers and copy stuff over into container via root. Not sure if there is a way to create an image of the backup I have now.

Then I have move my working containers from other servers into this one , so I can erase and connect them to this new cluster. May be I can do that as remote.anks

Thanks

For the most basic lxdbr0 (as lxd init gets you), this is the equivalent:

lxc network create lxdbr0
lxc profile device add default eth0 nic nictype=bridged parent=lxdbr0 name=eth0

That work except I ip6, instead of ip4 . We dont use ip6
±------±--------±-----±----------------------------------------------±-----------±----------±---------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | LOCATION |
±------±--------±-----±----------------------------------------------±-----------±----------±---------+
| test | RUNNING | | | PERSISTENT | | MOE |
±------±--------±-----±----------------------------------------------±-----------±----------±---------+
| test2 | RUNNING | | | PERSISTENT | | MOE |
±------±--------±-----±----------------------------------------------±-----------±----------±---------+
| test3 | RUNNING | | fd42:c53e:365e:76dd:216:3eff:fee3:eafb (eth0) | PERSISTENT | | MOE |
±------±--------±-----±----------------------------------------------±-----------±----------±---------+

lxc network set lxdbr0 ipv6.address none

That will disable IPv6, though the lack of IPv4 isn’t due to missing configuration on the bridge but more likely to be due to something going on with your container and DHCP.

OK, that is great, seems to be good have ip4, and no ip6

have to do the reboot test, fingers crossed

Now what s best way to move backup container into this thing. Do I create new container copy everything into and basically reinstall everything within.
Or is there a way to import a directory of a container into a container.