With the incus command line it is not possible to create an image alias if it already exists.
However, the images
server has duplicate aliases all over the place.
$ incus image list images: ubuntu/noble/cloud/amd64 -c Lft
+--------------------------+--------------+-----------------+
| ALIASES | FINGERPRINT | TYPE |
+--------------------------+--------------+-----------------+
| ubuntu/24.04/cloud | b148397bbc9d | CONTAINER |
| ubuntu/24.04/cloud/amd64 | | |
| ubuntu/noble/cloud | | |
| ubuntu/noble/cloud/amd64 | | |
+--------------------------+--------------+-----------------+
| ubuntu/24.04/cloud | e3c22552e85c | VIRTUAL-MACHINE |
| ubuntu/24.04/cloud/amd64 | | |
| ubuntu/noble/cloud | | |
| ubuntu/noble/cloud/amd64 | | |
+--------------------------+--------------+-----------------+
Is there a reason to not allow duplicate aliases from the incus command line?
$ incus init images:ubuntu/noble/cloud u1
Creating u1
$ incus init images:ubuntu/noble/cloud v1 --vm
Creating v1
$ incus image alias create ubuntu/noble/cloud b148397bbc9d
$ incus image alias create ubuntu/noble/cloud e3c22552e85c
Error: Alias "ubuntu/noble/cloud" already exists