svn commit: r270513 - head/share/examples/bhyve

Craig Rodrigues rodrigc at FreeBSD.org
Mon Aug 25 01:36:57 UTC 2014


Author: rodrigc
Date: Mon Aug 25 01:36:56 2014
New Revision: 270513
URL: http://svnweb.freebsd.org/changeset/base/270513

Log:
  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

Modified:
  head/share/examples/bhyve/vmrun.sh

Modified: head/share/examples/bhyve/vmrun.sh
==============================================================================
--- head/share/examples/bhyve/vmrun.sh	Mon Aug 25 01:04:07 2014	(r270512)
+++ head/share/examples/bhyve/vmrun.sh	Mon Aug 25 01:36:56 2014	(r270513)
@@ -173,8 +173,9 @@ echo "Launching virtual machine \"$vmnam
 
 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=$?


More information about the svn-src-head mailing list