Skip to content

Instantly share code, notes, and snippets.

@zekome
Created March 15, 2022 19:56
Show Gist options
  • Save zekome/17259139e98ea26b875681c57d6fe29a to your computer and use it in GitHub Desktop.
Save zekome/17259139e98ea26b875681c57d6fe29a to your computer and use it in GitHub Desktop.
Make CentOS-8.5.2111 cloud image

Download CentOS 8.4.2105 generic cloud image and then upgrade.

curl https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.4.2105-20210603.0.x86_64.qcow2 -o centos.qcow2

virt-customize -a centos.qcow2 \
--run-command "sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*.repo" \
--run-command "sed -i 's|^#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|' /etc/yum.repos.d/*.repo" \
--update --selinux-relabel

mv centos.qcow2 CentOS-8-GenericCloud-8.5.2111-x86_64.qcow2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment