virtualisation: Cloud images and `cloud-init`
For cloud VMs, the hyperscalers don't "install" the OS to an empty disk, they start from a pre-installed, runnable, base disk image called a cloud image then specialise it to make it distinct from all the other machines. To make this even faster, the resulting disk can use copy-on-write to only store differences to the common base image.
There is a common adopted approach to specialising the cloud image called cloud-init
. This includes a standard YAML configuration schema to describe the desired changes, and the name of the disk that should be mounted as on the fledgling VM. Each cloud image can have its own specific implementation of the cloud-init
process that can map the configuration to OS specific instructions.
Alpine and Ubuntu publish official cloud images for each cloud provider, with variations for how the VM boots (BIOS/UEFI), and whether cloud-init
is going to be used.