Skip to content

Instantly share code, notes, and snippets.

@liveaverage
Created July 2, 2019 16:47
Show Gist options
  • Save liveaverage/ecc74a8a6e423b1b26d6549a868417ce to your computer and use it in GitHub Desktop.
Save liveaverage/ecc74a8a6e423b1b26d6549a868417ce to your computer and use it in GitHub Desktop.
Update Cloud-init to Testing Release
cat <<EOT >> /tmp/update-cloud-init.sh
#!/bin/bash
# Script to configure newer cloud-init
set -eux
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
curl https://copr.fedorainfracloud.org/coprs/g/cloud-init/el-testing/repo/epel-7/group_cloud-init-el-testing-epel-7.repo > /etc/yum.repos.d/cloudinit.repo
yum -y install cloud-init
cloud-init clean --logs
EOT
virt-customize -a /var/lib/libvirt/images/<RHEL-IMAGE>.qcow2 \
--run /tmp/update-cloud-init.sh > /tmp/update-cloud-init.sh.log 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment