vmrun.sh: add -A option for AHCI emulation of disk devices
AHCI emulation is useful for testing scenarios closer to the real hardware. For example, it allows to exercise the CAM subsystem. There could be other uses as well. MFC after: 2 weeks
This commit is contained in:
parent
72f406a92c
commit
2205d3dd3e
@ -46,7 +46,7 @@ errmsg() {
|
||||
usage() {
|
||||
local msg=$1
|
||||
|
||||
echo "Usage: vmrun.sh [-aEhiTv] [-c <CPUs>] [-C <console>] [-d <disk file>]"
|
||||
echo "Usage: vmrun.sh [-aAEhiTv] [-c <CPUs>] [-C <console>] [-d <disk file>]"
|
||||
echo " [-e <name=value>] [-f <path of firmware>] [-F <size>]"
|
||||
echo " [-g <gdbport> ] [-H <directory>]"
|
||||
echo " [-I <location of installation iso>] [-l <loader>]"
|
||||
@ -55,6 +55,7 @@ usage() {
|
||||
echo ""
|
||||
echo " -h: display this help message"
|
||||
echo " -a: force memory mapped local APIC access"
|
||||
echo " -A: use AHCI disk emulation instead of virtio"
|
||||
echo " -c: number of virtual cpus (default is ${DEFAULT_CPUS})"
|
||||
echo " -C: console device (default is ${DEFAULT_CONSOLE})"
|
||||
echo " -d: virtio diskdev file (default is ${DEFAULT_VIRTIO_DISK})"
|
||||
@ -99,6 +100,7 @@ console=${DEFAULT_CONSOLE}
|
||||
cpus=${DEFAULT_CPUS}
|
||||
tap_total=0
|
||||
disk_total=0
|
||||
disk_emulation="virtio-blk"
|
||||
gdbport=0
|
||||
loader_opt=""
|
||||
bhyverun_opt="-H -A -P"
|
||||
@ -113,11 +115,14 @@ vncport=5900
|
||||
fbsize="w=1024,h=768"
|
||||
tablet=""
|
||||
|
||||
while getopts ac:C:d:e:Ef:F:g:hH:iI:l:m:p:P:t:Tuvw c ; do
|
||||
while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:m:p:P:t:Tuvw c ; do
|
||||
case $c in
|
||||
a)
|
||||
bhyverun_opt="${bhyverun_opt} -a"
|
||||
;;
|
||||
A)
|
||||
disk_emulation="ahci-hd"
|
||||
;;
|
||||
c)
|
||||
cpus=${OPTARG}
|
||||
;;
|
||||
@ -316,7 +321,7 @@ while [ 1 ]; do
|
||||
eval "disk=\$disk_dev${i}"
|
||||
eval "opts=\$disk_opts${i}"
|
||||
make_and_check_diskdev "${disk}"
|
||||
devargs="$devargs -s $nextslot:0,virtio-blk,${disk}${opts} "
|
||||
devargs="$devargs -s $nextslot:0,$disk_emulation,${disk}${opts} "
|
||||
nextslot=$(($nextslot + 1))
|
||||
i=$(($i + 1))
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user