KVM
KVM
This commit is contained in:
commit
30679916bd
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"
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue