arch="$(uname -m)"
canonical_arch="$(uname -m | sed 's/i[456]86/i386/')"
+verbose=no
timeout=10m
accel=kvm:tcg
echo " -m|--machine=machine Set machine type"
echo " -q|--qemu=qemu Set location of qemu/KVM binary"
echo " -t|--timeout=timeout Set the timeout"
+ echo " -v|--verbose Verbose output"
echo " -V|--version Display version and exit"
exit 0
}
TEMP=$(getopt \
- -o i:k:m:q:t:V \
+ -o i:k:m:q:t:vV \
--long help \
--long accel: \
--long initrd: \
--long machine: \
--long qemu: \
--long timeout: \
+ --long verbose \
--long version \
-n 'qemu-sanity-check' -- "$@")
if [ $? != 0 ]; then exit 2; fi
timeout="$2"
shift 2
;;
+ -v|--verbose)
+ verbose=yes
+ shift
+ ;;
-V|--version)
echo "@PACKAGE_NAME@ @PACKAGE_VERSION@"
exit 0
argv[$((i++))]="-append"
argv[$((i++))]="console=ttyS0 oops=panic panic=-1"
-#echo "${argv[@]}"
+if [ "$verbose" = "yes" ]; then
+ echo "${argv[@]}"
+fi
# Run the command.
timeout "$timeout" "${argv[@]}"