mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
KVM detection
This commit is contained in:
parent
479f02f89a
commit
7574a83325
@ -49,14 +49,14 @@ 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_OPTS=",accel=kvm -enable-kvm -cpu host"
|
KVM_OPTS=",accel=kvm -enable-kvm -cpu host"
|
||||||
else
|
else
|
||||||
KVM_ERR="(cpuinfo "$(egrep -c '(vmx|svm)' /proc/cpuinfo)")"
|
KVM_ERR="(cpuinfo $(grep -c -e vmx -e svm /proc/cpuinfo))"
|
||||||
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)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${KVM_OPTS}" ]; then
|
if [ -z "${KVM_OPTS}" ]; then
|
||||||
echo "Error: KVM acceleration not detected ${KVM_ERR}, please enable KVM on your host!"
|
echo "Error: KVM acceleration not detected ${KVM_ERR}, please enable it."
|
||||||
[ "$DEBUG" != "Y" ] && exit 88
|
[ "$DEBUG" != "Y" ] && exit 88
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user