cmd/run: add preflight checks
The "run" subcommand internally uses qemu-kvm and can benefit from
environmental checks and /dev/kvm massaging in order to avoid
(permissions) errors when spawning a VM.
set -euo pipefail
+dn=$(dirname $0)
+. ${dn}/cmdlib.sh
+
VM_DISK=
VM_MEMORY=2048
VM_PERSIST=0
@@ -70,6 +73,8 @@ while [ $# -ge 1 ]; do
esac
done
+preflight
+
if [ -z "${VM_DISK}" ]; then
if [ -L ./builds/latest ]; then
latest_build=$(readlink builds/latest)
