aboutsummaryrefslogtreecommitdiff
path: root/kvmx
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-23 09:53:54 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-23 09:53:54 -0300
commitc94472dc0e24d234eb8e135cfcc4029018072dc3 (patch)
tree7f0f25257e4da4d5c82ea1c74f98a41fea81153e /kvmx
parent23e5ab8db41d37ae70a226fc5446dc9ba51a26bc (diff)
downloadkvmx-c94472dc0e24d234eb8e135cfcc4029018072dc3.tar.gz
kvmx-c94472dc0e24d234eb8e135cfcc4029018072dc3.tar.bz2
Check for requirements and use spicy as default spice_client
Diffstat (limited to 'kvmx')
-rwxr-xr-xkvmx12
1 files changed, 11 insertions, 1 deletions
diff --git a/kvmx b/kvmx
index 1718ac5..c6c9137 100755
--- a/kvmx
+++ b/kvmx
@@ -88,6 +88,9 @@ function __kvmx_initialize {
export APP_BASE="`$DIRNAME/kvmx app_base`"
source $APP_BASE/lib/kvmx/functions || exit 1
+ # Check dependencies
+ __kvmx_check_dependencies
+
# Alias to be used in config files
KVMX_BASE="$APP_BASE"
@@ -215,6 +218,10 @@ function __kvmx_initialize {
echo "$BASENAME: WARNING: Intel VT or AMD-V not present at /proc/cpuinfo, expect slow performance"
fi
+ if ! lsmod | grep -q '^kvm '; then
+ echo "$BASENAME: WARNING: kvm kernel module not loaded, expect slow performance"
+ fi
+
if ! groups `whoami` | grep -q 'kvm'; then
echo "$BASENAME: WARNING: user `whoami` not in kvm group, expect slow performance"
fi
@@ -247,11 +254,14 @@ function kvmx_spice {
spicy -h localhost -p $PORT &
elif [ "$spice_client" == "virt-viewer" ] && which virt-viewer &> /dev/null; then
remote-viewer spice://localhost:$PORT &
- else
+ elif [ "$spice_client" == "spicec" ]; then
if which spicec &> /dev/null; then
# https://lists.freedesktop.org/archives/spice-devel/2013-September/014643.html
SPICE_NOGRAB=1 spicec --host localhost --port $PORT &> $SPICELOG &
fi
+ else
+ echo "$BASENAME: spice_client $spice_client not currently supported"
+ exit 1
fi
SPICEPID="$!"