Skip to content

Commit 9ebaa08

Browse files
authored
Merge pull request #720 from alisson276/master
Allow RHEL-like distros below version 8
2 parents 06da7a7 + 243eaae commit 9ebaa08

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Container orchestration:
3333

3434
Others:
3535
- [`vmnet.yaml`](./vmnet.yaml): ⭐enable [`vmnet.framework`](../docs/network.md)
36+
- [`deprecated/centos-7.yaml`](./deprecated/centos-7.yaml): [deprecated] CentOS 7
3637

3738
## Tier 1
3839

examples/deprecated/centos-7.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This example requires Lima v0.10.0 or later.
2+
# WARNING: RHEL-like below version 8 is unsupported, use at your own risk!
3+
images:
4+
- location: "https://cloud.centos.org/altarch/7/images/CentOS-7-x86_64-GenericCloud-2009.qcow2"
5+
arch: "x86_64"
6+
digest: "sha256:e38bab0475cc6d004d2e17015969c659e5a308111851b0e2715e84646035bdd3"
7+
- location: "https://cloud.centos.org/altarch/7/images/CentOS-7-aarch64-GenericCloud-2009.qcow2"
8+
arch: "aarch64"
9+
digest: "sha256:51c0222aa4bc7d966fc044eb6ce9182993a1dc398eaa595e58abd0d361439baf"
10+
# CentOS7 doesn't have support to systemd-user (https://bugzilla.redhat.com/show_bug.cgi?id=1173278)
11+
# containerd as system works, but you'd need to use nerdctl in the shell of the instance as root
12+
containerd:
13+
system: false
14+
user: false
15+
mounts:
16+
- location: "~"
17+
- location: "/tmp/lima"
18+
writable: true
19+
firmware:
20+
legacyBIOS: true
21+
cpuType:
22+
# Workaround for "vmx_write_mem: mmu_gva_to_gpa XXXXXXXXXXXXXXXX failed" on Intel Mac
23+
# https://bugs.launchpad.net/qemu/+bug/1838390
24+
x86_64: "Haswell-v4"

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,35 @@ elif command -v dnf >/dev/null 2>&1; then
7171
# Workaround for https://github.com/containerd/stargz-snapshotter/issues/340
7272
ln -s fusermount3 /usr/bin/fusermount
7373
fi
74+
elif command -v yum >/dev/null 2>&1; then
75+
echo "DEPRECATED: CentOS7 and others RHEL-like version 7 are unsupported and might be removed or stop to work in future lima releases"
76+
pkgs=""
77+
yum_install_flags="-y"
78+
if ! rpm -ql epel-release >/dev/null 2>&1; then
79+
yum install ${yum_install_flags} epel-release
80+
fi
81+
if ! command -v tar >/dev/null 2>&1; then
82+
pkgs="${pkgs} tar"
83+
fi
84+
if [ "${LIMA_CIDATA_MOUNTS}" -gt 0 ] && ! command -v sshfs >/dev/null 2>&1; then
85+
pkgs="${pkgs} fuse-sshfs"
86+
fi
87+
if [ "${INSTALL_IPTABLES}" = 1 ] && [ ! -e /usr/sbin/iptables ]; then
88+
pkgs="${pkgs} iptables"
89+
fi
90+
if [ "${LIMA_CIDATA_CONTAINERD_USER}" = 1 ]; then
91+
if ! command -v newuidmap >/dev/null 2>&1; then
92+
pkgs="${pkgs} shadow-utils"
93+
fi
94+
if ! command -v mount.fuse3 >/dev/null 2>&1; then
95+
pkgs="${pkgs} fuse3"
96+
fi
97+
fi
98+
if [ -n "${pkgs}" ]; then
99+
# shellcheck disable=SC2086
100+
yum install ${yum_install_flags} ${pkgs}
101+
yum-config-manager --disable epel >/dev/null 2>&1
102+
fi
74103
elif command -v pacman >/dev/null 2>&1; then
75104
pkgs=""
76105
if [ "${LIMA_CIDATA_MOUNTS}" -gt 0 ] && ! command -v sshfs >/dev/null 2>&1; then

0 commit comments

Comments
 (0)