Use Ubuntu cloud images to launch a VM

I want to launch a VM based on a cloud image from ubuntu:

I tried to import it

lxc image import ubuntu.img --alias ubuntuimg

it fails with: Error: Metadata tarball is missing metadata.yaml

Any guide how to use cloud images with lxd?


“lxc launch ubuntu:22.04 v1 --vm”

See “lxc remote list” for the different image repositories available by default.

I have custom cloud image, not one from the registry.

Which file did you download from Ubuntu 22.04 (Jammy Jellyfish) [20230210] ?

One easy way to do this is to launch a new instance using the command I suggested above, then make the desired modifications inside the instance, and once finished use lxc publish <instance> --alias foo to create an image from it to use to create new instances.


1 Like

Thank you, that’s what I need

1 Like