mirror of
https://github.com/thelittlerocket/pve.git
synced 2024-11-15 11:38:00 +08:00
Update check_kernal.sh
This commit is contained in:
parent
9590dedc79
commit
e30aee7c42
1 changed files with 3 additions and 3 deletions
|
@ -9,13 +9,13 @@ _blue() { echo -e "\033[36m\033[01m$@\033[0m"; }
|
|||
|
||||
# 检查CPU是否支持硬件虚拟化
|
||||
if [ "$(egrep -c '(vmx|svm)' /proc/cpuinfo)" -eq 0 ]; then
|
||||
_red "CPU不支持硬件虚拟化,无法嵌套虚拟化KVM服务器"
|
||||
_red "CPU不支持硬件虚拟化,无法嵌套虚拟化KVM服务器,但可以开LXC服务器(CT)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 检查虚拟化选项是否启用
|
||||
if [ "$(grep -E -c '(vmx|svm)' /proc/cpuinfo)" -eq 0 ]; then
|
||||
_red "BIOS中未启用硬件虚拟化,无法嵌套虚拟化KVM服务器"
|
||||
_red "BIOS中未启用硬件虚拟化,无法嵌套虚拟化KVM服务器,但可以开LXC服务器(CT)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -26,5 +26,5 @@ else
|
|||
# 加载KVM模块并将其添加到/etc/modules文件中
|
||||
modprobe kvm
|
||||
echo "kvm" >> /etc/modules
|
||||
_green "KVM模块已加载并添加到 /etc/modules 可以使用PVE虚拟化KVM服务器"
|
||||
_green "KVM模块已加载并添加到 /etc/modules 可以使用PVE虚拟化KVM服务器,也可以开LXC服务器(CT)"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue