If the VM was reset via "/sbin/reboot" or "shutdown -r",

then it is no longer necessary to "bhyvectl --destroy" the VM when it reboots.
Move the "bhyvectl --destroy" outside of the while loop.

Reviewed by: neel
This commit is contained in:
Craig Rodrigues 2014-08-25 01:36:56 +00:00
parent ff5cb9fd50
commit 1437f5003e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270513

View File

@ -173,8 +173,9 @@ echo "Launching virtual machine \"$vmname\" ..."
virtio_diskdev="$disk_dev0"
${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1
while [ 1 ]; do
${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1
file ${virtio_diskdev} | grep "boot sector" > /dev/null
rc=$?