diff options
author | avg <avg@FreeBSD.org> | 2015-06-15 13:01:42 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2015-06-15 13:01:42 +0000 |
commit | 80507db286c286eb0364718eb024979e4c64474e (patch) | |
tree | 7fdf977c13ab2ebdd195d7c8f7ca1b84c06febed /share | |
parent | b9b97e8288f6d2f505e7a0fbb3657e21700ad30b (diff) | |
download | FreeBSD-src-80507db286c286eb0364718eb024979e4c64474e.zip FreeBSD-src-80507db286c286eb0364718eb024979e4c64474e.tar.gz |
MFC r284023: bhyve/vmrun.sh: support passing disk options same as for bhyve(8)
Diffstat (limited to 'share')
-rwxr-xr-x | share/examples/bhyve/vmrun.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index f7bb2a0..dd8a897 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -96,7 +96,10 @@ while getopts ac:C:d:e:g:hH:iI:m:t: c ; do console=${OPTARG} ;; d) - eval "disk_dev${disk_total}=\"${OPTARG}\"" + disk_dev=${OPTARG%%,*} + disk_opts=${OPTARG#${disk_dev}} + eval "disk_dev${disk_total}=\"${disk_dev}\"" + eval "disk_opts${disk_total}=\"${disk_opts}\"" disk_total=$(($disk_total + 1)) ;; e) @@ -225,8 +228,9 @@ while [ 1 ]; do i=0 while [ $i -lt $disk_total ] ; do eval "disk=\$disk_dev${i}" + eval "opts=\$disk_opts${i}" make_and_check_diskdev "${disk}" - devargs="$devargs -s $nextslot:0,virtio-blk,${disk} " + devargs="$devargs -s $nextslot:0,virtio-blk,${disk}${opts} " nextslot=$(($nextslot + 1)) i=$(($i + 1)) done |