File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1111
1212# Todo:
1313#
14- # 1. Optionally do not require /dev/kvm permissions
14+ # <del> 1. Optionally do not require /dev/kvm permissions</del>
1515# 2. Verify if this script works under host /mnt/ directory
1616
1717IS_GUEST=${IS_GUEST:- false}
@@ -108,7 +108,7 @@ host() {
108108
109109 local accel
110110 if [[ " $( uname -m) " = " ${VM_ARCH} " ]]; then
111- if [[ -e /dev/kvm ]]; then
111+ if [[ -e /dev/kvm && -r /dev/kvm && -w /dev/kvm ]]; then
112112 accel+=" -machine accel=kvm:tcg"
113113 accel+=" -enable-kvm"
114114 fi
@@ -121,7 +121,7 @@ host() {
121121 case " ${VM_ARCH} " in
122122 x86_64)
123123 if [[ " $( uname -m) " = " ${VM_ARCH} " ]]; then
124- if [[ -e /dev/kvm ]]; then
124+ if [[ -e /dev/kvm && -r /dev/kvm && -w /dev/kvm ]]; then
125125 cpu=" host"
126126 else
127127 cpu=" max"
You can’t perform that action at this time.
0 commit comments