Date: Thu, 23 Nov 2017 22:10:12 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326140 - head/share/examples/bhyve Message-ID: <201711232210.vANMACJW036170@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Thu Nov 23 22:10:12 2017 New Revision: 326140 URL: https://svnweb.freebsd.org/changeset/base/326140 Log: 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 Modified: head/share/examples/bhyve/vmrun.sh Modified: head/share/examples/bhyve/vmrun.sh ============================================================================== --- head/share/examples/bhyve/vmrun.sh Thu Nov 23 19:10:09 2017 (r326139) +++ head/share/examples/bhyve/vmrun.sh Thu Nov 23 22:10:12 2017 (r326140) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711232210.vANMACJW036170>