Commit 30679916 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

KVM

KVM
parents 09f1e5b4 38c7bcf6
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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