From owner-svn-src-all@FreeBSD.ORG Mon Aug 25 01:36:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D880C697; Mon, 25 Aug 2014 01:36:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C41F13C3F; Mon, 25 Aug 2014 01:36:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7P1au1c060524; Mon, 25 Aug 2014 01:36:56 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7P1audn060523; Mon, 25 Aug 2014 01:36:56 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201408250136.s7P1audn060523@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Mon, 25 Aug 2014 01:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270513 - head/share/examples/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Aug 2014 01:36:57 -0000 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=$?