I’m experimenting with building a custom image from which I can start ephemeral instances. I created a VM following this tutorial. The resulting VM works exactly as expected. I can then publish it as an image.
When I try to start a new instance using that image, it gives me an error about the disk.
Creating the instance Error: Create instance from image: Failed to run: /snap/lxd/19389/bin/sgdisk --move-second-header /var/snap/lxd/common/lxd/storage-pools/default/images/6ba8557f5c0f8ba1c8123a72324544505f9c415ad625019059bdaf6a0c395c3b/root.img: Caution: invalid backup GPT header, but valid main header; regenerating backup header from main header. Warning! Error 25 reading partition table for CRC check! Warning! One or more CRCs don't match. You should repair the disk! Aborting write operation!
Should I be doing something else to my VM image before publishing it?
lxc init also throws the above error; so I can’t really ever get to the root.img disk file to try to repair it.