fix #392 zvol device may not be available immediately

This commit is contained in:
Matt Churchyard
2021-01-05 09:23:28 +00:00
parent 9e0e096837
commit 3b7560cba6

View File

@@ -314,6 +314,9 @@ core::write_img(){
_disk_dev="${1}"
_img="$2"
# wait a few seconds for newly created zvol device to appear
sleep 2
# just run start with an iso
datastore::img_find "_imgpath" "${_img}" || util::err "unable to locate img file - '${_img}'"
qemu-img dd -O raw if="${_imgpath}" of="${_disk_dev}" bs=1M