Hi, In case it is of use to anyone, here is a little patch to improve use of ZFS volumes with vmrun.sh
--- /usr/share/examples/bhyve/vmrun.sh 2015-08-12 15:27:20.000000000 +0000 +++ ./vmrun.sh 2016-01-14 13:17:27.972055736 +0000 @@ -166,11 +166,24 @@ make_and_check_diskdev() { local virtio_diskdev="$1" + local ZVOL=0 # Create the virtio diskdev file if needed - if [ ! -f ${virtio_diskdev} ]; then + case "${virtio_diskdev}" in + /dev/zvol/*) ZVOL=1 ;; + esac + + if [ $ZVOL -eq 0 ]; then + if [ ! -f ${virtio_diskdev} ]; then echo "virtio disk device file \"${virtio_diskdev}\" does not exist." echo "Creating it ..." truncate -s 8G ${virtio_diskdev} > /dev/null + fi + else + if [ ! -c ${virtio_diskdev} ]; then + echo "virtio disk device volume \"${virtio_diskdev}\" does not exist." + echo "Please create it" + exit 1 + fi fi if [ ! -r ${virtio_diskdev} ]; then regards John John Dickinson http://sinodun.com Sinodun Internet Technologies Ltd. Magdalen Centre Oxford Science Park Robert Robinson Avenue Oxford OX4 4GA U.K.
signature.asc
Description: OpenPGP digital signature