Yesterday I was testing listening on local Ip addresses, e.g. lxc config set core.https_address I am sure i restored it, then i was playing around an Alpine VM, after adding a proxy and restarting it, started getting strange errors in the VM, i just left it. Today when booting up, LXD is no longer working.
How do I debug? Cant run any lxc commands.
notroot@desktop:~$ lxc list
Error: Get "http://unix.socket/1.0": dial unix /var/snap/lxd/common/lxd/unix.socket: connect: connection refused
I cant run sudo lxd init. The lxd pool does not contain any important data. I use this for testing so i need this behave like a clean install, if i uninstall and reinstall will previous data/settings remain?
That command worked, but i am now getting another error, something went wrong yesterday, not sure what. I presume i did lxd init in the wrong window or something but i am not so sure. I just remember things started going wrong when playing around with an alpine VM, and i left it that.
$ lxc start c1
Error: Failed preparing container for start: Failed to start device "eth0": Failed to run: ovs-vsctl --may-exist add-port vnet0 veth3b65555e: ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
Try `lxc info --show-log c1` for more info
$ lxc info --show-log c1
Name: c1
Location: none
Remote: unix://
Architecture: x86_64
Created: 2021/07/14 11:32 UTC
Status: Stopped
Type: container
Profiles:
Log:
lxc info --show-log vm1
Name: vm1
Location: none
Remote: unix://
Architecture: x86_64
Created: 2021/07/14 11:54 UTC
Status: Stopped
Type: virtual-machine
Profiles:
Error: open /var/snap/lxd/common/lxd/logs/vm1/qemu.log: no such file or directory
+--------+----------+---------+-----------------------+---------+
| NAME | TYPE | MANAGED | DESCRIPTION | USED BY |
+--------+----------+---------+-----------------------+---------+
| eno1 | physical | NO | | 0 |
+--------+----------+---------+-----------------------+---------+
| lxdbr0 | bridge | YES | | 1 |
+--------+----------+---------+-----------------------+---------+
| virbr0 | bridge | NO | | 0 |
+--------+----------+---------+-----------------------+---------+
| vnet0 | bridge | YES | | 3 |
+--------+----------+---------+-----------------------+---------+
The config data looks really thin. I was doing a few lxc config set core.https_address on that host such the local ip address and so forth and then switching back. So not sure if that might of caused the corruption or it was just me…
Any idea why all your interfaces appear to be down? That’s not something that LXD would normally do so may suggest some network management tool had some fun.
I checked the netplan, it says its handled by Network Manager. Despite it being a desktop, i am using it remotely . The only I was doing yesterday was testing the listen address for LXD to find if there was a better or more secure way than just listening on everything and testing LXD VMs, then i started to get strange errors inside the alpine VM, noticed apache was not working and could not re-install it. I am just going to delete it and next time just VMs for development.I have 6 lxd hosts setup, and this not happened before. Note I am using both LXD and KVM with virtual machines on the desktop, so maybe the wires got crossed with LXD virtual machines somehow and that sent network manager into a tailspin.
This morning I created a container, and it started without problems, tried to start an old container and it also worked without problems. So not sure what happened, but it seems to have resolved itself.