Skip to content

Instantly share code, notes, and snippets.

@zekome
zekome / upgrade_centos_cloud_image.md
Created March 15, 2022 19:56
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

Turn off AER logging for NVMe and event severity corrected

Motherboard: Asus Pro WS WRX80E-SAGE SE WIFI
Card: Asus HYPER M.2 X16 GEN 4 CARD
NVMe: 4x Samsung SSD 980 PRO 1TB
OS: Linux fedora 5.16.12-200.fc35.x86_64

AER, advanced error reporting logs excessively:

Upgrade CentOS after EOL to Rocky Linux or CentOS Stream

When you try to install using package manager on CentOS Linux after EOL date (December 31, 2021) you'll get an error:

Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

That's because repositories have been moved to centos project vault location. A way to handle is to point urls from repos configuration to centos vault location. Then it's possible to update CentOS (for example, from previous version 8.4.2105) to the latest version 8.5.2111. From there you could shift towards Rocky Linux or CentOS Stream following recommended procedure.