Trying to create a VM from repository images
image downloaded and showing in lxc image ls: Debian stretch amd64 (20220411_05:24) | x86_64 | VIRTUAL-MACHINE | 219.06MB
by using a profile
devices:
root:
path: /
pool: pl2
size: 4GB
type: disk
Error: Failed creating instance from image: Source image size (4294967296) exceeds specified volume size (4000000000)
Do I need to determine (and where to get the values) for each VM, what minimum root size?
There is no Idea about what minimum space the vm will require to create the zfs/pool2/virtual-machines/container.block
Anyway, setting a root size of anything below 4.1GB, throughs an error:
3GB root: Error: Failed creating instance from image: Source image size (4294967296) exceeds specified volume size (4000000000)
4GB root: Error: Failed creating instance from image: Source image size (4294967296) exceeds specified volume size (3000000000)
Is 429496729 bytes (4Gib) the magic minimum size?
I remember, previously been able to create alpine VM on 2GB root, which was fully sufficient.
There is no minimum size officially, but it just may be that distrobuilder is building them with a minimum size of 4GiB (@monstermunchkin any thoughts on this?)
But because its possible to make your own images too, and support other remotes, we can’t say for sure what the absolute minimum is.
You could for instance create an empty VM with a 2GiB disk size and then load an OS into it and then publish and that image would then have a 2GiB minimum size.
Ah yes thats right, the volatile.rootfs.size key I was thinking of is only created on the optimized pool storage volume DB record once it has been successfully unpacked the first time.
When just looking at lxc image ls or lxc image show there is currently no meta data that indicates the size of the uncompressed block image file contained within.
Is there a reason we don’t specify a minimal disk size if the OS can fit into it on a per-distro basis? This would allow us to create smaller VMs if the chosen image allowed it.