after whole day of googling and fooling around I nearly am in the end of “prodding” LXD node in my homelab. I have few questions that are kind of blockers for me due to my lack of knowledge :
General: I managed to install on Ubuntu 18 Server via snappy after few tries. Ubuntu 18 comes with LXD preinstalled via .deb package so to move to snap install I had to remove everything via
sudo apt remove --purge lxd lxd-client liblxc1 lxcfsotherwise when just removing lxd,
sudo apt purge lxd*, I got socket error while connecting to LXD after initial init. Is this OK?
Storage: I have RAIDZ2 (5x 4TB) storage based on HDDs. Now few questions here:
a) I am waiting for power cables for my PSU so I could connect 2 SSDs and create ZFS mirror and I’d like to know what would be the best way to change default storage to SSDs and migrate all containers to it.
b) I have specific scenario where host is sharing storage with one or two containers. I found a way to share on https://ubuntu.com/blog/mounting-your-home-directory-in-lxd but say my users have different uid/guid and here is my question, how to do it properly? Host, say uid/guid of the user is 412:415, should be happy with RO while container(s) will have to have RW rights. This is biggest blocker for me as everything is happening on single host (NAS/Storage) and I might have NUC cluster + separate storage in the future.
I managed to create br0 on Netplan so some containers would have direct access to my LAN. Then I created natbr0 via LXD so I would have NAT for other containers. So I have created 3 different profiles:
a) default -> br0
b) NAT -> natbr0
c) dualnic -> br0 + natbr0
All works cool in a way. I noticed that while default profile is used there is no issue. My LAN DHCP is assigning addresses. While creating containers with either NAT or dualnic then fun starts. Please notice here for me eth0 is my LAN and eth1 is LXDs internal LAN and all is tested on Ubuntu 18.04 containers.
- So with dualnic eth0 is getting an address while eth1 does not so I must disable cloud-init in it and add eth1 manually.
- Same goes for NAT. In this profile I’ve set eth1 as network device so when listing I could see which container is connected to which network. Similiar story to dualnic, cloud-init pushes config to eth0 anyways.
How to fix this?
I think that is all I have for now. I’d appreciate if someone could point me or help me with setting this or say that all is good Let me know if you need specific settings from my current setup so you could see how this is configured right now.