From e6f351a912ee0216823a18ce364019e7333c634d Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 7 Apr 2025 16:56:44 +0200 Subject: [PATCH] feat: Detect Docker Desktop --- src/proc.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/proc.sh b/src/proc.sh index 129d70f..3f9f7f2 100644 --- a/src/proc.sh +++ b/src/proc.sh @@ -53,9 +53,17 @@ if [[ "$KVM" != [Nn]* ]]; then KVM="N" if [[ "$OSTYPE" =~ ^darwin ]]; then warn "you are using macOS which has no KVM support, this will cause a major loss of performance." - else - error "KVM acceleration not available $KVM_ERR, this will cause a major loss of performance." - error "See the FAQ on how to diagnose the cause, or continue without KVM by setting KVM=N (not recommended)." + else + kernel=$(uname -a) + case "${kernel,,}" in + *"microsoft"* ) + error "Please bind '/dev/kvm' as a volume in the optional container settings when using Docker Desktop." ;; + *"synology"* ) + error "Please make sure that Synology VMM (Virtual Machine Manager) is installed and that '/dev/kvm' is binded to this container." ;; + *) + error "KVM acceleration not available $KVM_ERR, this will cause a major loss of performance." + error "See the FAQ on how to diagnose the cause, or continue without KVM by setting KVM=N (not recommended)." ;; + esac [[ "$DEBUG" != [Yy1]* ]] && exit 88 fi fi