summaryrefslogtreecommitdiffstats
path: root/share/examples
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2014-08-25 01:36:56 +0000
committerrodrigc <rodrigc@FreeBSD.org>2014-08-25 01:36:56 +0000
commit4e257f23d9d4c4f2920a95f3cb804ebd6f32ef3c (patch)
treecd9ab279105c1318878e817d6d35007b84c796bd /share/examples
parent41670b8e382c4161b594d684b7e4f899708e41f1 (diff)
downloadFreeBSD-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-xshare/examples/bhyve/vmrun.sh3
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=$?
OpenPOWER on IntegriCloud