How do you specify "release" and "variant" when using "lxc init"?

Using lxc remote list I saw that the general images URL was sourced from https://images.linuxcontainers.org which for me redirects to https://uk.lxd.images.canonical.com.

Looking at the format (using lxc init --help) it seems to be lxc init [[<remote>:]<image>] [<remote>:][<name>] [< config [flags], and I’m not sure how all the columns from the webpage above can be mapped to lxc init.

It seems like the “distribution” column maps to <image>. So if I wanted to install archlinux, I’d run lxc init images:archlinux, but then how would I define the “variant” of cloud or default?

Similarly if I wanted to install Ubuntu from images: (I know the ubuntu: remote exists) how would I specify the “release” between bionic and focal?

Aside from the --help options, I’ve tried to look for documentation in the places below, but couldn’t find my answer there.

Similarly, I can’t seem to find the valid values for lxc init --type.

Images - LXD documentation (and its subpages)

Releases are specified using a forward slash. For example, you can specify ubuntu focal using images:ubuntu/focal.

You can search for images on a remote using lxc image list <remote>:. For example, to list all ubuntu images in the images remote you can do lxc image list images:ubuntu.

1 Like

You can specify the variant by specifying /cloud at the end, e.g.

lxc init:images:ubuntu/jammy/cloud

Note: The official Ubuntu images from lxc init ubuntu:<release> have cloud-init already.