How to Get LXD Running on Ubuntu Touch (Focal & Noble)
Here's a rough walkthrough on getting LXD running on UT based on my experience.
If you're on Ubuntu Touch Focal, you’ll need to enable snap support first. Install Snapz0r from the Open Store, run it and initialize snap support. If you're on Noble you can skip this step, since snap support is already enabled.
Next, install LXD. I used version 5.21 specifically, because newer versions gave me trouble on the JingPad. You can install it like this:
$ sudo snap install lxd --channel=5.21/stable
Once LXD is installed, initialize it with:
$ sudo lxd init
Accept all the defaults except for the storage backend. When prompted, choose dir instead of zfs, which tends to be problematic in this environment.
After that, you need to adjust the default profile to allow nested containers and privileged access:
sudo lxc profile set default security.nesting true
sudo lxc profile set default security.privileged true
Now you can launch your first container. For example, to create one based on Ubuntu Noble:
sudo lxc launch ubuntu:noble noble-1
Wait for the container to boot. You can check its status with:
sudo lxc list
Once it's up, you can enter the container with:
sudo lxc exec noble-1 -- bash
At this point, you should be inside a fully functional Ubuntu container running on Ubuntu Touch. Let me know if you hit any issues or have suggestions to improve the process.