cloud-init
is package performing various configurations on a virtual machine on first boot. You have to configure a file with your config, and throw it at your VM then you virtualize it.
But how exactly does it work ? How is the user data sent to the VM, and how cloud-init manages to execute the configurations ?
Thank you.
short answer - datasources.
Cloud-init has the concept of datasources which point to the source of the user-data and metadata.
Have a look here https://cloudinit.readthedocs.io/en/latest/topics/datasources.html