KVM
This commit is contained in:
parent
09f1e5b46f
commit
38c7bcf655
1 changed files with 3 additions and 2 deletions
|
@ -21,6 +21,7 @@ trap 'error "Status $? while: ${BASH_COMMAND} (line $LINENO/$BASH_LINENO)"' ERR
|
||||||
|
|
||||||
STORAGE="/storage"
|
STORAGE="/storage"
|
||||||
KERNEL=$(uname -r | cut -b 1)
|
KERNEL=$(uname -r | cut -b 1)
|
||||||
|
ARCH=$(dpkg --print-architecture)
|
||||||
|
|
||||||
[ ! -d "$STORAGE" ] && error "Storage folder (${STORAGE}) not found!" && exit 13
|
[ ! -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 [ -e /dev/kvm ] && sh -c 'echo -n > /dev/kvm' &> /dev/null; then
|
||||||
if ! grep -q -e vmx -e svm /proc/cpuinfo; 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
|
fi
|
||||||
else
|
else
|
||||||
[ -e /dev/kvm ] && KVM_ERR="(no write access)" || KVM_ERR="(device file missing)"
|
[ -e /dev/kvm ] && KVM_ERR="(no write access)" || KVM_ERR="(device file missing)"
|
||||||
|
@ -50,7 +51,7 @@ fi
|
||||||
|
|
||||||
if [ -n "${KVM_ERR}" ]; then
|
if [ -n "${KVM_ERR}" ]; then
|
||||||
error "KVM acceleration not detected ${KVM_ERR}, see the FAQ about this."
|
error "KVM acceleration not detected ${KVM_ERR}, see the FAQ about this."
|
||||||
[[ "${DEBUG}" == [Yy1]* ]] && exit 88
|
[[ "${DEBUG}" != [Yy1]* ]] && exit 88
|
||||||
else
|
else
|
||||||
KVM_OPTS=",accel=kvm -enable-kvm -cpu host"
|
KVM_OPTS=",accel=kvm -enable-kvm -cpu host"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue