Unable to install MaaS snap on LXD

After reading more and getting a better understanding of LXD uid mapping, just changing the following on my host system seems enough to resolve this:

# Modify the default root user subuid mapping on my system 
# to a larger range which includes the UID of the snap_daemon user: 584788
sed -i 's/root:1000000:65536/root:1000000:655360/g' /etc/subuid

# Restart the LXD daemon
systemctl restart lxd.service

# Re-create a fresh container to pick up the new map range
lxc delete --force maas
lxc launch ubuntu:20.04 maas

# Continue with installing maas in the LXD per the docs

If the snap of mass-test-db is also to be installed, the same approach above can also be applied to the /etc/subgid file to prevent similar errors with that snap during install.

2 Likes