canonical_arch="$(uname -m | sed 's/i[456]86/i386/')"
timeout=10m
+accel=kvm:tcg
# Handle command line parsing.
echo "qemu-sanity-check [options]"
echo "Options:"
echo " --help Display this help"
+ echo " --accel=[kvm|tcg] Force KVM or software emulation"
echo " -i|--initrd=initrd Set location of initramfs"
echo " -k|--kernel=vmlinuz Set location of kernel"
echo " -q|--qemu=qemu Set location of qemu/KVM binary"
TEMP=$(getopt \
-o i:k:q:t:V \
--long help \
+ --long accel: \
--long initrd: \
--long kernel: \
--long qemu: \
--help)
usage
;;
+ --accel)
+ accel="$2"
+ shift 2
+ ;;
-i|--initrd)
initrd="$2"
shift 2
argv[$((i++))]="-nodefconfig"
argv[$((i++))]="-nodefaults"
argv[$((i++))]="-machine"
-argv[$((i++))]="accel=kvm:tcg"
+argv[$((i++))]="accel=$accel"
argv[$((i++))]="-no-reboot"
argv[$((i++))]="-serial"
argv[$((i++))]="file:$test_output"
Display short help message and exit.
+=item B<--accel>=kvm
+
+=item B<--accel>=tcg
+
+=item B<--accel>=kvm:tcg
+
+This sets the C<-machine accel=...> parameter which is passed to
+qemu.
+
+If not set, then C<kvm:tcg> is the default, which means to try to use
+KVM (hardware-assisted virtualization), and fall back to software
+emulation if KVM is not possible.
+
+Other typical values of this parameter are: C<tcg>, which means to
+force software emulation. C<kvm>, which means to force KVM and fail
+if KVM is unavailable.
+
=item B<-i> INITRD
=item B<--initrd>=INITRD