-
David Johnson authored
This cleanly refactors everything we do to VM images (asserting the random passwd, disabling root passwd, changing sshd config, etc). This allows us to support adding extra images based on URL/name user provides us in params, and to allow them to call our script after profile instantiation to add an image. It's fairly comprehensive and it certainly works for the common cloud images from various linux vendors. It also rolls multi-nic support into each image. We do this via boot-time udev scripts and dhcp hooks that ensure we don't add routes for interfaces other than eth0 (this ensures that the default gateway is always attached to eth0). The old, hacky, sometimes-broken multi-nic support is gone, as is the special image. I have no idea why cloud images don't just include this feature by default... it's not hard at all. We support Ubuntu and Fedora/Centos. We support basically the image formats that qemu-nbd supports (i.e., qcow, vmware, vdi, raw), and gz or xz compression. That seems to cover the core spectrum. On aarch64, we yank the kernel and initrd out of the image's /boot and create an AMI/AKI/ARI image tuple, instead of uploading the raw disk image. I have never figured out how to boot a raw Ubuntu cloud image on KVM/aarch64, and the HP guys never got back to me. So this is the only way I know (well, there's UEFI, and there's a UEFI aarch64 BIOS, so the UEFI cloud images might work... but life is way too short for all that fun).
3b3a8d50