Skip to content

Commit 6aa168c

Browse files
authored
Merge pull request #901 from afbjorklund/centos-examples
Add examples for CentOS Linux and CentOS Stream both
2 parents 5f435ce + 6022227 commit 6aa168c

File tree

4 files changed

+47
-1
lines changed

4 files changed

+47
-1
lines changed

examples/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Distro:
88
- [`almalinux.yaml`](./almalinux.yaml): AlmaLinux
99
- [`alpine.yaml`](./alpine.yaml): ⭐Alpine Linux
1010
- [`archlinux.yaml`](./archlinux.yaml): ⭐Arch Linux
11+
- centos.yaml: ~~CentOS Linux 8~~ ([EOL](https://www.centos.org/centos-linux-eol/))
12+
- [`centos-stream.yaml`](./centos-stream.yaml): CentOS Stream 8
1113
- [`debian.yaml`](./debian.yaml): ⭐Debian GNU/Linux
1214
- [`fedora.yaml`](./fedora.yaml): ⭐Fedora
1315
- [`opensuse.yaml`](./opensuse.yaml): ⭐openSUSE Leap
@@ -33,7 +35,8 @@ Container orchestration:
3335

3436
Others:
3537
- [`vmnet.yaml`](./vmnet.yaml): ⭐enable [`vmnet.framework`](../docs/network.md)
36-
- [`deprecated/centos-7.yaml`](./deprecated/centos-7.yaml): [deprecated] CentOS 7
38+
- [`deprecated/centos-7.yaml`](./deprecated/centos-7.yaml): [deprecated] CentOS Linux 7
39+
- [`experimental/centos-stream-9.yaml`](experimental/centos-stream-9.yaml): [experimental] CentOS Stream 9
3740
- [`experimental/9p.yaml`](experimental/9p.yaml): [experimental] use 9p mount type
3841
- [`experimental/riscv64.yaml`](experimental/riscv64.yaml): [experimental] RISC-V
3942
- [`experimental/apptainer.yaml`](./experimental/apptainer.yaml): [experimental] [Apptainer](https://apptainer.org/)

examples/centos-stream.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This example requires Lima v0.8.3 or later.
2+
3+
images:
4+
- location: "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-GenericCloud-8-20220125.1.x86_64.qcow2"
5+
arch: "x86_64"
6+
digest: "sha256:a25560ab39e10594ee7a4a1dadcba7bf303b7c3c41559b4a7fc3c522540a6672"
7+
- location: "https://cloud.centos.org/centos/8-stream/aarch64/images/CentOS-Stream-GenericCloud-8-20220125.1.aarch64.qcow2"
8+
arch: "aarch64"
9+
digest: "sha256:d973991085db0ca8373e1d9948440213cdc76b6acf8f17aa2aed2163c1347cbc"
10+
mounts:
11+
- location: "~"
12+
- location: "/tmp/lima"
13+
writable: true
14+
firmware:
15+
legacyBIOS: true
16+
cpuType:
17+
# Workaround for "vmx_write_mem: mmu_gva_to_gpa XXXXXXXXXXXXXXXX failed" on Intel Mac
18+
# https://bugs.launchpad.net/qemu/+bug/1838390
19+
x86_64: "Haswell-v4"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# This example requires Lima v0.8.3 or later.
2+
3+
images:
4+
- location: "https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-9-20220606.0.x86_64.qcow2"
5+
arch: "x86_64"
6+
digest: "sha256:41c8cce7b5ed9ba70f7f103f058bd6320e3462f2dc2c97db84ad7f1c6918a525"
7+
- location: "https://cloud.centos.org/centos/9-stream/aarch64/images/CentOS-Stream-GenericCloud-9-20220606.0.aarch64.qcow2"
8+
arch: "aarch64"
9+
digest: "sha256:55ef64861d7f9cf5d1407af708fba8ad6015b54bfda81913cc942785091912b0"
10+
mounts:
11+
- location: "~"
12+
- location: "/tmp/lima"
13+
writable: true
14+
firmware:
15+
legacyBIOS: true
16+
cpuType:
17+
# Workaround for "vmx_write_mem: mmu_gva_to_gpa XXXXXXXXXXXXXXXX failed" on Intel Mac
18+
# https://bugs.launchpad.net/qemu/+bug/1838390
19+
x86_64: "Haswell-v4"

pkg/cidata/cidata.TEMPLATE.d/boot/30-install-packages.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ elif command -v dnf >/dev/null 2>&1; then
6767
dnf_install_flags="${dnf_install_flags} --repo ol8_baseos_latest --repo ol8_codeready_builder"
6868
elif grep -q "release 8" /etc/system-release; then
6969
dnf_install_flags="${dnf_install_flags} --enablerepo powertools"
70+
elif grep -q "release 9" /etc/system-release; then
71+
# shellcheck disable=SC2086
72+
dnf install ${dnf_install_flags} epel-release
73+
dnf config-manager --disable epel >/dev/null 2>&1
74+
dnf_install_flags="${dnf_install_flags} --enablerepo epel"
7075
fi
7176
# shellcheck disable=SC2086
7277
dnf install ${dnf_install_flags} ${pkgs}

0 commit comments

Comments
 (0)