Is it possible to launch official ubuntu images using incus?

I have added official ubuntu image url to incus remote list .

ubuntu (current) | Ubuntu Cloud Images | simplestreams | none | YES | NO | NO

Trying to launch ubuntu image using incus command

incus launch ubuntu:22.04 ubuntu-jammy
Error: The remote isn’t a private server

I am able to launch ubuntu images using images: , is it possible to launch images using ubuntu: using incus?

incus remote list

±-----------------±-----------------------------------------±--------------±------------±-------±-------±-------+
| NAME | URL | PROTOCOL | AUTH TYPE | PUBLIC | STATIC | GLOBAL |
±-----------------±-----------------------------------------±--------------±------------±-------±-------±-------+
| images | https://images.linuxcontainers.org | simplestreams | none | YES | NO | NO |
±-----------------±-----------------------------------------±--------------±------------±-------±-------±-------+
| local | unix:// | incus | file access | NO | YES | NO |
±-----------------±-----------------------------------------±--------------±------------±-------±-------±-------+
| ubuntu (current) | https://cloud-images.ubuntu.com/releases| simplestreams | none | YES | NO | NO |
±-----------------±-----------------------------------------±--------------±------------±-------±-------±-------+

Please suggest on this?

You shouldn’t incus remote switch to an image server as otherwise it will try to create the instance on the image server, failing with the error you’re getting.

So run incus remote switch local to be back to your local system.

That said, I expect incus image list ubuntu: to be empty as the Ubuntu image servers don’t publish images with the Incus metadata.

You can manually go to Ubuntu 22.04 LTS (Jammy Jellyfish) release [20240319], then download ubuntu-22.04-server-cloudimg-amd64.squashfs and ubuntu-22.04-server-cloudimg-amd64-lxd.tar.xz and then manually import those locally with:

incus image import --alias ubuntu-2204 ubuntu-22.04-server-cloudimg-amd64-lxd.tar.xz ubuntu-22.04-server-cloudimg-amd64.squashfs

After which you can do:

incus launch ubuntu2204 ubuntu-jammy

There are a few places I noticed where this could be tidied up.

  1. In the incus documentation, it says

    All images from the ubuntu and ubuntu-daily image servers have cloud-init support

    But that doesn’t help if you can’t use those image servers with incus - and the link to “image servers” doesn’t mention them.

  2. Here it says:

    The incus CLI command is pre-configured with several remote image servers.

    However there’s only one: images. (There’s local as well, but that isn’t remote).

  3. When bootstrapping incus, it tells you to try “incus launch images:blah”. However in git, it looks like some of the translations are out of date. For example:

./po/fr.po:"Pour démarrer votre premier conteneur, essayer : lxc launch ubuntu:16.04"
./po/fr.po:#~ "To start your first container, try: lxc launch ubuntu:20.04\n"
./po/fr.po:#~ "Or for a virtual machine: lxc launch ubuntu:20.04 --vm"
./po/fr.po:#~ "Pour démarrer votre premier conteneur, essayer : lxc launch ubuntu:16.04"
./po/fr.po:#~ msgid "To start your first instance, try: lxc launch ubuntu:20.04"
./po/fr.po:#~ "Pour démarrer votre premier conteneur, essayer : lxc launch ubuntu:16.04"
./po/fr.po:#~ "    lxc init ubuntu:16.04 u1"
./po/fr.po:#~ "    lxc init ubuntu:16.04 u1"
./po/fr.po:#~ "    lxc launch ubuntu:16.04 u1"
./po/fr.po:#~ "    lxc launch ubuntu:16.04 u1"
./po/fr.po:#~ msgid "To start your first instance, try: lxc launch ubuntu:18.04"
./po/fr.po:#~ "Pour démarrer votre premier conteneur, essayer : lxc launch ubuntu:16.04"

The translation file doesn’t matter as those are former translated strings and not currently visible messages.

Sorry about point 1. I noticed that recently too but I did not push a fix.