Cloud-init
Jump to navigation
Jump to search
Getting Started
https://docs.openstack.org/image-guide/create-images-manually.html
https://pcocc.readthedocs.io/en/latest/manpages/man7/cloudconfig-tutorial.html
Fedora/RHEL
https://www.projectatomic.io/docs/quickstart/
Debian
Buster
Ubuntu
Get image
wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
Then create vm using this image.
cloud.txt
#cloud-config password: Password1 chpasswd: { expire: False } ssh_pwauth: True hostname: proxy1
Create iso for existing vm
sudo cloud-localds /tmp/cloud-init-cd.iso cloud.txt
Mount cloud-init-cd.iso to cdrom in vm and boot.
Login with ubuntu:Password1
Sizing Image
qemu-img resize kvm1.qcow2 +20G cp kvm1.qcow2 kvm1-orig.qcow2 virt-resize --expand /dev/sda1 kvm1-orig.qcow2 kvm1.qcow2
Issues
genisoimage and mkisofs not working with pass. Looking into.
Serial Port Needed
https://bugs.launchpad.net/cloud-images/+bug/1573095
You can remove
sudo sed -i 's/ console=ttyS0//g' /etc/default/grub.d/50-cloudimg-settings.cfg sudo update-grub
However, we need ttyS0 for virsh console
https://help.ubuntu.com/community/KVM/Access
Getting Started
- https://www.theurbanpenguin.com/using-cloud-images-in-kvm/
- https://devops.profitbricks.com/tutorials/deploy-a-centos-server-customized-with-cloud-init/
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/installation_and_configuration_guide/setting_up_cloud_init
- https://www.digitalocean.com/community/tutorials/how-to-use-cloud-config-for-your-initial-server-setup
Resources
- https://pcocc.readthedocs.io/en/latest/manpages/man7/cloudconfig-tutorial.html
- https://cloud-images.ubuntu.com/releases/bionic/release/
- https://cloudinit.readthedocs.io/en/latest/topics/examples.html
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/installation_and_configuration_guide/setting_up_cloud_init