From owner-freebsd-virtualization@FreeBSD.ORG Mon May 25 03:08:37 2015 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3104AB08 for ; Mon, 25 May 2015 03:08:37 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E938829 for ; Mon, 25 May 2015 03:08:36 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t4P38ZtB022047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 24 May 2015 20:08:36 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t4P38ZXg022046; Sun, 24 May 2015 20:08:35 -0700 (PDT) (envelope-from jmg) Date: Sun, 24 May 2015 20:08:35 -0700 From: John-Mark Gurney To: Paul Vixie Cc: "freebsd-virtualization@freebsd.org" Subject: Re: can we get some interaction between halt/reboot and bhyve? Message-ID: <20150525030835.GB37063@funkthat.com> References: <5562755C.8090407@redbarn.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5562755C.8090407@redbarn.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sun, 24 May 2015 20:08:36 -0700 (PDT) X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2015 03:08:37 -0000 Paul Vixie wrote this message on Sun, May 24, 2015 at 18:05 -0700: > bhyve interprets SIGTERM as an ACPI poweroff, and usually the VM will > shutdown very quickly. but it may not happen in five seconds, which is > all halt(8) (and reboot(8)) promises. the code for reboot and halt > (/usr/src/sbin/reboot/reboot.c) is shown below. what's the right way to > change this so that if there are 50 bhyve processes running and they are > ACPI powerdowning as fast as they can, then the halt or reboot of the > bare metal will wait for them? Shouldn't shutdown be used instead of reboot/halt? This allows various rc.d scripts to run, and you can use that to make sure all your bhyve instances are shutdown... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."