Skip to content

Commit 44431a1

Browse files
authored
Merge pull request #3441 from AkihiroSuda/fix-3438
oraclelinux: fix virtiofs support
2 parents f3cbd68 + 08ab5de commit 44431a1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ if [ "${LIMA_CIDATA_SKIP_DEFAULT_DEPENDENCY_RESOLUTION}" = 1 ]; then
3838
exit 0
3939
fi
4040

41+
REMOUNT_VIRTIOFS=0
42+
4143
if head -c 4 "$(command -v apt-get)" | grep -qP '\x7fELF' >/dev/null 2>&1; then
4244
pkgs=""
4345
if [ "${LIMA_CIDATA_MOUNTTYPE}" = "reverse-sshfs" ]; then
@@ -101,6 +103,14 @@ elif command -v dnf >/dev/null 2>&1; then
101103
dnf config-manager --disable epel\* >/dev/null 2>&1
102104
epel_install_flags="${epel_install_flags} --enablerepo epel"
103105
fi
106+
if grep -q "Oracle Linux Server" /etc/system-release && [ "${LIMA_CIDATA_MOUNTTYPE}" = "virtiofs" ]; then
107+
# Enable repositories like "ol9_UEKR7"
108+
for repo in $(dnf -q repolist | awk '/UEK/NR>1{print $1}'); do
109+
epel_install_flags="${epel_install_flags} --enablerepo ${repo}"
110+
done
111+
extrapkgs="${extrapkgs} kernel-uek-modules-$(uname -r)"
112+
REMOUNT_VIRTIOFS=1
113+
fi
104114
if [ -n "${pkgs}" ]; then
105115
# shellcheck disable=SC2086
106116
dnf install ${dnf_install_flags} ${pkgs}
@@ -188,3 +198,7 @@ elif command -v apk >/dev/null 2>&1; then
188198
apk add ${pkgs}
189199
fi
190200
fi
201+
202+
if [ "${REMOUNT_VIRTIOFS}" = 1 ]; then
203+
mount -t virtiofs -a
204+
fi

0 commit comments

Comments
 (0)