diff options
author | rodrigc <rodrigc@FreeBSD.org> | 2014-08-25 01:36:56 +0000 |
---|---|---|
committer | rodrigc <rodrigc@FreeBSD.org> | 2014-08-25 01:36:56 +0000 |
commit | 4e257f23d9d4c4f2920a95f3cb804ebd6f32ef3c (patch) | |
tree | cd9ab279105c1318878e817d6d35007b84c796bd /share/examples | |
parent | 41670b8e382c4161b594d684b7e4f899708e41f1 (diff) | |
download | FreeBSD-src-4e257f23d9d4c4f2920a95f3cb804ebd6f32ef3c.zip FreeBSD-src-4e257f23d9d4c4f2920a95f3cb804ebd6f32ef3c.tar.gz |
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
Diffstat (limited to 'share/examples')
-rwxr-xr-x | share/examples/bhyve/vmrun.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index 3fd3300..fdc0621 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -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=$? |