mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-08 01:18:32 +08:00
fix: KVM check (#529)
This commit is contained in:
parent
84643647cc
commit
d65b5a089a
10
src/proc.sh
10
src/proc.sh
@ -14,12 +14,16 @@ if [[ "$KVM" != [Nn]* ]]; then
|
|||||||
|
|
||||||
KVM_ERR=""
|
KVM_ERR=""
|
||||||
|
|
||||||
if [ -e /dev/kvm ] && sh -c 'echo -n > /dev/kvm' &> /dev/null; then
|
if [ ! -e /dev/kvm ]; then
|
||||||
|
KVM_ERR="(device file missing)"
|
||||||
|
else
|
||||||
|
if ! sh -c 'echo -n > /dev/kvm' &> /dev/null; then
|
||||||
|
KVM_ERR="(no write access)"
|
||||||
|
else
|
||||||
if ! grep -q -e vmx -e svm /proc/cpuinfo; then
|
if ! grep -q -e vmx -e svm /proc/cpuinfo; then
|
||||||
KVM_ERR="(vmx/svm disabled)"
|
KVM_ERR="(vmx/svm disabled)"
|
||||||
fi
|
fi
|
||||||
else
|
fi
|
||||||
[ -e /dev/kvm ] && KVM_ERR="(no write access)" || KVM_ERR="(device file missing)"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$KVM_ERR" ]; then
|
if [ -n "$KVM_ERR" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user