Skip to content

Commit

Permalink
Fix #283 we shouldn't try to create a sparse file if template specifi…
Browse files Browse the repository at this point in the history
…es a custom disk
  • Loading branch information
churchers committed Feb 8, 2019
1 parent a903048 commit d885a79
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/vm-base
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions lib/vm-core
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d885a79

Please sign in to comment.