File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,11 @@ configureNetworks () {
219
219
220
220
# MAIN
221
221
222
+ # enable KVM support onl if the host supports it
223
+ if [[ $( grep -e vmx -e svm /proc/cpuinfo) ]]; then
224
+ KVM_OPTS=" $KVM_OPTS -enable-kvm "
225
+ fi
226
+
222
227
# Debugging mode
223
228
if [ " $1 " = " bash" ]; then
224
229
export LAUNCHER=$LAUNCHER
@@ -229,7 +234,7 @@ if [ "$1" = "bash" ]; then
229
234
export DNS_SERVERS=$DNS_SERVERS
230
235
export KVM_BLK_OPTS=$KVM_BLK_OPTS
231
236
export KVM_OPTS=" $KVM_OPTS -nographic"
232
- alias launcher=" $LAUNCHER -enable-kvm $KVM_BLK_OPTS $KVM_OPTS $KVM_CPU_OPTS $KVM_NET_OPTS "
237
+ alias launcher=" $LAUNCHER $KVM_BLK_OPTS $KVM_OPTS $KVM_CPU_OPTS $KVM_NET_OPTS "
233
238
exec bash
234
239
fi
235
240
@@ -297,5 +302,5 @@ if [[ "$ENABLE_DHCP" == 1 ]]; then
297
302
$DNSMASQ $DNSMASQ_OPTS
298
303
fi
299
304
300
- echo " INFO: Launching $LAUNCHER -enable-kvm $KVM_BLK_OPTS $KVM_OPTS $KVM_VIDEO_OPTS $KVM_CPU_OPTS $KVM_ARGS $@ $KVM_NET_OPTS "
301
- eval exec $LAUNCHER -enable-kvm $KVM_BLK_OPTS $KVM_OPTS $KVM_VIDEO_OPTS $KVM_CPU_OPTS " $@ " $KVM_NET_OPTS
305
+ echo " INFO: Launching $LAUNCHER $KVM_BLK_OPTS $KVM_OPTS $KVM_VIDEO_OPTS $KVM_CPU_OPTS $KVM_ARGS $@ $KVM_NET_OPTS "
306
+ eval exec $LAUNCHER $KVM_BLK_OPTS $KVM_OPTS $KVM_VIDEO_OPTS $KVM_CPU_OPTS " $@ " $KVM_NET_OPTS
You can’t perform that action at this time.
0 commit comments