mirror of
https://github.com/churchers/vm-bhyve.git
synced 2025-12-11 09:20:17 +01:00
Fix #283 we shouldn't try to create a sparse file if template specifies a custom disk
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
VERSION=1.3-devel
|
||||
VERSION_INT=103100
|
||||
VERSION_INT=103101
|
||||
VERSION_BSD=$(uname -K)
|
||||
PATH=${PATH}:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
|
||||
|
||||
|
||||
@@ -185,6 +185,8 @@ core::create(){
|
||||
zfs::make_zvol "${VM_DS_ZFS_DATASET}/${_name}/${_disk}" "${_disk_size}" "1" "${_zfs_opts}"
|
||||
[ $_num -eq 0 ] && [ ! -z "$_img" ] && core::write_img "/dev/zvol/${VM_DS_ZFS_DATASET}/${_name}/${_disk}" "${_img}"
|
||||
;;
|
||||
custom)
|
||||
;;
|
||||
*)
|
||||
truncate -s "${_disk_size}" "${VM_DS_PATH}/${_name}/${_disk}"
|
||||
[ $? -eq 0 ] || util::err "failed to create sparse file for disk image"
|
||||
|
||||
Reference in New Issue
Block a user