mezobari
(mezobari)
February 14, 2023, 2:06pm
1
I want to launch a VM based on a cloud image from ubuntu:
http://cloud-images.ubuntu.com/releases/jammy/release/
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?
tomp
(Thomas Parrott)
February 14, 2023, 8:29pm
2
Use
“lxc launch ubuntu:22.04 v1 --vm”
tomp
(Thomas Parrott)
February 14, 2023, 8:33pm
3
See “lxc remote list” for the different image repositories available by default.
mezobari
(mezobari)
February 14, 2023, 9:41pm
4
I have custom cloud image, not one from the registry.
tomp
(Thomas Parrott)
February 15, 2023, 8:19am
5
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.
See https://linuxcontainers.org/lxd/docs/master/image-handling/#publishing-an-instance-or-snapshot-as-a-new-image
1 Like
mezobari
(mezobari)
February 15, 2023, 10:27am
6
Thank you, that’s what I need
1 Like