Skip to content

Commit

Permalink
feat: Updated cluster-up/check.sh for s390x special checks
Browse files Browse the repository at this point in the history
On an IBM Z system (s390x), huge-page backing storage and nested virtualization cannot be used at the same time.

Ref: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/configuring_and_managing_virtualization/creating-nested-virtual-machines_configuring-and-managing-virtualization

Signed-off-by: chandramerla <[email protected]>
  • Loading branch information
chandramerla committed Sep 8, 2024
1 parent d88d35e commit bff1c08
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cluster-up/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,17 @@ fi

KVM_ARCH=""
KVM_NESTED="unknown"
KVM_HPAGE="unknown"
if [ -f "/sys/module/kvm_intel/parameters/nested" ]; then
KVM_NESTED=$( cat /sys/module/kvm_intel/parameters/nested )
KVM_ARCH="intel"
elif [ -f "/sys/module/kvm_amd/parameters/nested" ]; then
KVM_NESTED=$( cat /sys/module/kvm_amd/parameters/nested )
KVM_ARCH="amd"
elif [ -f "/sys/module/kvm/parameters/nested" ]; then
KVM_NESTED=$( cat /sys/module/kvm/parameters/nested )
KVM_ARCH="s390x"
KVM_HPAGE=$( cat /sys/module/kvm/parameters/hpage )
fi

function is_enabled() {
Expand All @@ -49,3 +54,7 @@ if is_enabled "$KVM_NESTED"; then
else
echo "[ERR ] $KVM_ARCH nested virtualization not enabled"
fi

if is_enabled "$KVM_HPAGE" && [ "$(uname -m)" = "s390x" ]; then
echo "[ERR ] $KVM_HPAGE KVM hugepage enabled. It need to be disabled while nested virtualization is enabled for s390x"
fi

0 comments on commit bff1c08

Please sign in to comment.