From 4588840fba9bf658c336ffb2cf84df3335bdade9 Mon Sep 17 00:00:00 2001 From: spiritLHLS <103393591+spiritLHLS@users.noreply.github.com> Date: Tue, 25 Apr 2023 14:31:00 +0800 Subject: [PATCH] Update check_kernal.sh --- scripts/check_kernal.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_kernal.sh b/scripts/check_kernal.sh index 0e912ea..7666a3c 100644 --- a/scripts/check_kernal.sh +++ b/scripts/check_kernal.sh @@ -34,7 +34,7 @@ else fi # 查询系统是否支持 -if [ "$(cat /sys/module/kvm_intel/parameters/nested)" = "Y" ]; then +if [ -e "/sys/module/kvm_intel/parameters/nested" ] && [ "$(cat /sys/module/kvm_intel/parameters/nested | tr '[:upper:]' '[:lower:]')" = "y" ]; then if lsmod | grep -q kvm; then _green "本机系统支持KVM硬件嵌套虚拟化" _green "本机符合要求:可以使用PVE虚拟化KVM服务器,并可以在开出来的KVM服务器选项中开启KVM硬件虚拟化"