Both ubuntu:focal and images:ubuntu/cloud images use cloud-init templates (see here). The difference is that ubuntu:focal only considers user.* keys whereas images:ubuntu/cloud considers both user.* and cloud-init.* keys.
This is indeed confusing as e.g. ubuntu:jammy uses cloud-init.* keys.
@stgraber would it be possible to update the template files for older ubuntu: images to consider cloud-init.* keys?
On LXD < 5.1 based hosts (which included Ubuntu Focal and Ubuntu Bionic by default), there is a bug related to rendering of specific characters. This was fixed upstream, but not ported to the LTS snap channels yet
So we had to revert our move to the LXD datasource on 18.04 and 20.04 guests as there appears most use cases are matching Host and Guest version. Note that 18.04 hosts running LXD 4.0 will still hit this bug with 22.04+ Ubuntu guests.
When the patch is backported to 4.0 channel, we’ll re-add the LXD datasource move once the fix is backported. Specific users that raised the issue are also working on changing their cloud-init scripts to stop using the offending symbols.