Creating controller fails with juju 3.1

$ juju --version
3.1.5-genericlinux-amd64
$ lxd --version
5.15
$ uname -r
5.15.0-75-generic

I have been able to get things running with juju 2.9, but have found that I am unable to progress when starting fresh with juju 3.1. It looks like some kind of problem with apparmor.

Going through the instructions, I am unable to bootstrap a controller: https://juju.is/docs/olm/lxd#heading--create-a-controller

$ juju clouds
update.go:85: cannot change mount namespace according to change mount (/run/user/1816201106/doc/by-app/snap.juju /run/user/1816201106/doc none bind,rw,x-snapd.ignore-missing 0 0): cannot inspect "/run/user/1816201106/doc": lstat /run/user/1816201106/doc: permission denied
Only clouds with registered credentials are shown.
There are more clouds, use --all to see them.
You can bootstrap a new controller using one of these clouds...

Clouds available on the client:
Cloud      Regions  Default    Type  Credentials  Source    Description
localhost  1        localhost  lxd   1            built-in  LXD Container Hypervisor

The task eventually times out while attempting to connect to the instance:-

$ juju bootstrap localhost overlord
update.go:85: cannot change mount namespace according to change mount (/run/user/1816201106/doc/by-app/snap.juju /run/user/1816201106/doc none bind,rw,x-snapd.ignore-missing 0 0): cannot inspect "/run/user/1816201106/doc": lstat /run/user/1816201106/doc: permission denied
Creating Juju controller "overlord" on localhost/localhost
Looking for packaged Juju agent version 3.1.5 for amd64
Located Juju agent version 3.1.5-ubuntu-amd64 at https://streams.canonical.com/juju/tools/agent/3.1.5/juju-3.1.5-linux-amd64.tgz
To configure your system to better support LXD containers, please see: https://linuxcontainers.org/lxd/docs/master/explanation/performance_tuning/
Launching controller instance(s) on localhost/localhost...
 - juju-7e3525-0 (arch=amd64)                 
Installing Juju agent on bootstrap instance
Waiting for address
Attempting to connect to 10.16.107.49:22
Attempting to connect to fd42:d3d2:4ed9:b93:216:3eff:fef9:a8fd:22
ERROR failed to bootstrap model: cancelled

I am able to connect to the instance while the task is still running:-

$ nc -zv 10.16.107.49 22
Connection to 10.16.107.49 22 port [tcp/ssh] succeeded!
$ lxc exec juju-7e3525-0 bash
root@juju-7e3525-0:~# 

The instance is cleaned up afterwards:-

$ lxc exec juju-7e3525-0 bash
Error: Instance not found
$ lxc list
+------+-------+------+------+------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+-------+------+------+------+-----------+