puppet 4 foo
[mirror/dsa-puppet.git] / modules / debian_org / files / molly-guard / 10-check-kvm
diff --git a/modules/debian_org/files/molly-guard/10-check-kvm b/modules/debian_org/files/molly-guard/10-check-kvm
new file mode 100644 (file)
index 0000000..e9ed39c
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+KVMCOUNT=`pgrep -cx '^(qemu-)?kvm$'`
+if [ $KVMCOUNT != 0 ]; then
+       echo "Found $KVMCOUNT qemu-kvm instances running, aborting $MOLLYGUARD_CMD!"
+       exit 1
+fi