I’m new here so forgive me if I don’t explain my situation too well. Firstly I’ve really been enjoying LXD via the SNAP packages on my Debian 10 server. It’s been running solid for over a 8 months but yesterday it went sour for me. I simply rebooted my Debian 10 server as it had been up for sometime (no updates installed before this reboot). Normally the system comes back and I don’t even have to think about it. However on this occasion something nasty happened and I couldn’t get LXC to work. It was trying to bind to the wrong IP address, even though the host server has a static address in interfaces.conf.
After a lot of reading and troubleshooting late into the night I made the decision that lxd or some component was borked and I would have to reinstall. I’ve reinstalled LXD via snap with success but now face an issue importing my existing containers. I have the directory for each container but can’t seem to work out how one imports these.
The directory is as such:
/var/lib/lxc which is mount point from a dataset of my ZFS setup. So the Host OS deals with ZFS and LXC sees /var/lib/lxc as a directory.
Can I see the publicip profile in question please? Also how are you handing out IPs to your containers from the router?
I think the issue here is that lxc network attach-profile is for attaching an LXD managed network to a profile with a specific interface name.
So in this case, publicip is the network name, and eth0 is the profile name, and enp1s0f0 is the interface name inside the profile, which doesn’t look right.
Thank you for all your help so far. It’s been a long 24 hours for me. Essentially I have a VLAN for my public IP space. Each container has a static IP assigned within the /etc/network/interfaces file. I then used to just pass through the physical interface on the host machine (it has several nics).
I seem to remember somehow assigning the physical interface to the profile.
Currently the publicip profile looks like this:
lxc profile show publicip
config: {}
description: ""
devices: {}
name: publicip
used_by:
- /1.0/instances/sweeping-bear
I think you would either need to create a bridge to your vlan interface and attach each container to the bridge, or use a macvlan device type that parents off of the vlan interface.