KVM
This commit is contained in:
Kroese 2023-05-20 03:04:13 +02:00 committed by GitHub
commit 30679916bd

View file

@ -21,6 +21,7 @@ trap 'error "Status $? while: ${BASH_COMMAND} (line $LINENO/$BASH_LINENO)"' ERR
STORAGE="/storage"
KERNEL=$(uname -r | cut -b 1)
ARCH=$(dpkg --print-architecture)
[ ! -d "$STORAGE" ] && error "Storage folder (${STORAGE}) not found!" && exit 13
@ -42,7 +43,7 @@ KVM_OPTS=""
if [ -e /dev/kvm ] && sh -c 'echo -n > /dev/kvm' &> /dev/null; then
if ! grep -q -e vmx -e svm /proc/cpuinfo; then
KVM_ERR="(cpuinfo $(grep -c -e vmx -e svm /proc/cpuinfo))"
KVM_ERR="(vmx/svm disabled)"
fi
else
[ -e /dev/kvm ] && KVM_ERR="(no write access)" || KVM_ERR="(device file missing)"
@ -50,7 +51,7 @@ fi
if [ -n "${KVM_ERR}" ]; then
error "KVM acceleration not detected ${KVM_ERR}, see the FAQ about this."
[[ "${DEBUG}" == [Yy1]* ]] && exit 88
[[ "${DEBUG}" != [Yy1]* ]] && exit 88
else
KVM_OPTS=",accel=kvm -enable-kvm -cpu host"
fi