From 6ee3daa9614636260cc18afd75596f7eb0954308 Mon Sep 17 00:00:00 2001 From: spiritLHLS <103393591+spiritLHLS@users.noreply.github.com> Date: Wed, 15 Feb 2023 15:34:21 +0800 Subject: [PATCH] Update check_kernal.sh --- check_kernal.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/check_kernal.sh b/check_kernal.sh index 4e17296..a21f9a2 100644 --- a/check_kernal.sh +++ b/check_kernal.sh @@ -3,12 +3,14 @@ # 检查CPU是否支持硬件虚拟化 if [ "$(egrep -c '(vmx|svm)' /proc/cpuinfo)" -eq 0 ]; then - echo "CPU不支持硬件虚拟化" + echo "CPU不支持硬件虚拟化,无法嵌套虚拟化KVM服务器" + exit 1 fi # 检查虚拟化选项是否启用 if [ "$(grep -E -c '(vmx|svm)' /proc/cpuinfo)" -eq 0 ]; then - echo "BIOS中未启用硬件虚拟化" + echo "BIOS中未启用硬件虚拟化,无法嵌套虚拟化KVM服务器" + exit 1 fi # 检查KVM模块是否已加载