vmrun.sh (279925) | vmrun.sh (284023) |
---|---|
1#!/bin/sh 2# 3# Copyright (c) 2013 NetApp, Inc. 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# | 1#!/bin/sh 2# 3# Copyright (c) 2013 NetApp, Inc. 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: head/share/examples/bhyve/vmrun.sh 279925 2015-03-12 15:58:07Z glebius $ | 27# $FreeBSD: head/share/examples/bhyve/vmrun.sh 284023 2015-06-05 15:14:54Z avg $ |
28# 29 30LOADER=/usr/sbin/bhyveload 31BHYVECTL=/usr/sbin/bhyvectl 32FBSDRUN=/usr/sbin/bhyve 33 34DEFAULT_MEMSIZE=512M 35DEFAULT_CPUS=2 --- 63 unchanged lines hidden (view full) --- 99 ;; 100 c) 101 cpus=${OPTARG} 102 ;; 103 C) 104 console=${OPTARG} 105 ;; 106 d) | 28# 29 30LOADER=/usr/sbin/bhyveload 31BHYVECTL=/usr/sbin/bhyvectl 32FBSDRUN=/usr/sbin/bhyve 33 34DEFAULT_MEMSIZE=512M 35DEFAULT_CPUS=2 --- 63 unchanged lines hidden (view full) --- 99 ;; 100 c) 101 cpus=${OPTARG} 102 ;; 103 C) 104 console=${OPTARG} 105 ;; 106 d) |
107 eval "disk_dev${disk_total}=\"${OPTARG}\"" | 107 disk_dev=${OPTARG%%,*} 108 disk_opts=${OPTARG#${disk_dev}} 109 eval "disk_dev${disk_total}=\"${disk_dev}\"" 110 eval "disk_opts${disk_total}=\"${disk_opts}\"" |
108 disk_total=$(($disk_total + 1)) 109 ;; 110 e) 111 loader_opt="${loader_opt} -e ${OPTARG}" 112 ;; 113 g) 114 gdbport=${OPTARG} 115 ;; --- 116 unchanged lines hidden (view full) --- 232 devargs="$devargs -s $nextslot:0,virtio-net,${tapname} " 233 nextslot=$(($nextslot + 1)) 234 i=$(($i + 1)) 235 done 236 237 i=0 238 while [ $i -lt $disk_total ] ; do 239 eval "disk=\$disk_dev${i}" | 111 disk_total=$(($disk_total + 1)) 112 ;; 113 e) 114 loader_opt="${loader_opt} -e ${OPTARG}" 115 ;; 116 g) 117 gdbport=${OPTARG} 118 ;; --- 116 unchanged lines hidden (view full) --- 235 devargs="$devargs -s $nextslot:0,virtio-net,${tapname} " 236 nextslot=$(($nextslot + 1)) 237 i=$(($i + 1)) 238 done 239 240 i=0 241 while [ $i -lt $disk_total ] ; do 242 eval "disk=\$disk_dev${i}" |
243 eval "opts=\$disk_opts${i}" |
|
240 make_and_check_diskdev "${disk}" | 244 make_and_check_diskdev "${disk}" |
241 devargs="$devargs -s $nextslot:0,virtio-blk,${disk} " | 245 devargs="$devargs -s $nextslot:0,virtio-blk,${disk}${opts} " |
242 nextslot=$(($nextslot + 1)) 243 i=$(($i + 1)) 244 done 245 246 i=0 247 while [ $i -lt $pass_total ] ; do 248 eval "pass=\$pass_dev${i}" 249 devargs="$devargs -s $nextslot:0,passthru,${pass} " --- 36 unchanged lines hidden --- | 246 nextslot=$(($nextslot + 1)) 247 i=$(($i + 1)) 248 done 249 250 i=0 251 while [ $i -lt $pass_total ] ; do 252 eval "pass=\$pass_dev${i}" 253 devargs="$devargs -s $nextslot:0,passthru,${pass} " --- 36 unchanged lines hidden --- |