From owner-freebsd-virtualization@FreeBSD.ORG Mon May 25 01:05:41 2015 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C51A4381 for ; Mon, 25 May 2015 01:05:41 +0000 (UTC) (envelope-from paul@redbarn.org) Received: from family.redbarn.org (family.redbarn.org [IPv6:2001:559:8000:cd::5]) (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 B1D7524B for ; Mon, 25 May 2015 01:05:41 +0000 (UTC) (envelope-from paul@redbarn.org) Received: from [IPv6:2001:559:8000:cb:c102:7d6:6720:f5ce] (unknown [IPv6:2001:559:8000:cb:c102:7d6:6720:f5ce]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by family.redbarn.org (Postfix) with ESMTPSA id C94BB1814C for ; Mon, 25 May 2015 00:10:17 +0000 (UTC) Message-ID: <5562755C.8090407@redbarn.org> Date: Sun, 24 May 2015 18:05:32 -0700 From: Paul Vixie User-Agent: Postbox 3.0.11 (Windows/20140602) MIME-Version: 1.0 To: "freebsd-virtualization@freebsd.org" Subject: can we get some interaction between halt/reboot and bhyve? X-Enigmail-Version: 1.2.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 01:05:41 -0000 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? /* Send a SIGTERM first, a chance to save the buffers. */ if (kill(-1, SIGTERM) == -1 && errno != ESRCH) err(1, "SIGTERM processes"); /* * After the processes receive the signal, start the rest of the * buffers on their way. Wait 5 seconds between the SIGTERM and * the SIGKILL to give everybody a chance. If there is a lot of * paging activity then wait longer, up to a maximum of approx * 60 seconds. */ sleep(2); for (i = 0; i < 20; i++) { pageins = get_pageins(); if (!nflag) sync(); sleep(3); if (get_pageins() == pageins) break; } for (i = 1;; ++i) { if (kill(-1, SIGKILL) == -1) { if (errno == ESRCH) break; goto restart; } if (i > 5) { (void)fprintf(stderr, "WARNING: some process(es) wouldn't die\n"); break; } (void)sleep(2 * i); } -- Paul Vixie 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." From owner-freebsd-virtualization@FreeBSD.ORG Mon May 25 04:32:19 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 15F57555 for ; Mon, 25 May 2015 04:32:19 +0000 (UTC) (envelope-from paul@redbarn.org) Received: from family.redbarn.org (family.redbarn.org [IPv6:2001:559:8000:cd::5]) (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 00D46D9D for ; Mon, 25 May 2015 04:32:18 +0000 (UTC) (envelope-from paul@redbarn.org) Received: from [IPv6:2001:559:8000:cb:c102:7d6:6720:f5ce] (unknown [IPv6:2001:559:8000:cb:c102:7d6:6720:f5ce]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by family.redbarn.org (Postfix) with ESMTPSA id 4F0EA184E8; Mon, 25 May 2015 04:32:18 +0000 (UTC) Message-ID: <5562A5D0.7050207@redbarn.org> Date: Sun, 24 May 2015 21:32:16 -0700 From: Paul Vixie User-Agent: Postbox 3.0.11 (Windows/20140602) MIME-Version: 1.0 To: John-Mark Gurney CC: "freebsd-virtualization@freebsd.org" Subject: Re: can we get some interaction between halt/reboot and bhyve? References: <5562755C.8090407@redbarn.org> <20150525030835.GB37063@funkthat.com> In-Reply-To: <20150525030835.GB37063@funkthat.com> X-Enigmail-Version: 1.2.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 04:32:19 -0000 John-Mark Gurney wrote: > 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... yes. but, if the reboot or poweroff or halt command is used, i'd like my bhyve's to have enough time to umount their ufs zvol's. the rc.d script should pass along some softer signal that can cause the bhyve to do its own clean shutdown. but where SIGTERM is used, which is passed on as ACPI power-off, i'd like busy (that is, not hung, trying hard to shut down cleanly) bhyve's to get more time. the current poweroff/halt/reboot command only looks for evidence of paging as a reason to extend the time between SIGTERM and SIGKILL. i'd like to give it some bhyve-relevant additional reason to delay that SIGKILL. -- Paul Vixie From owner-freebsd-virtualization@FreeBSD.ORG Mon May 25 06:01:52 2015 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4CA1D50 for ; Mon, 25 May 2015 06:01:52 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id 9003130A for ; Mon, 25 May 2015 06:01:51 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [192.168.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 71968ACC34 for ; Mon, 25 May 2015 06:01:45 +0000 (UTC) Message-ID: <5562BACA.4040104@freebsd.org> Date: Mon, 25 May 2015 02:01:46 -0400 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: freebsd-virtualization@freebsd.org Subject: Re: can we get some interaction between halt/reboot and bhyve? References: <5562755C.8090407@redbarn.org> <20150525030835.GB37063@funkthat.com> <5562A5D0.7050207@redbarn.org> In-Reply-To: <5562A5D0.7050207@redbarn.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="R18NtFvO4RNG2FiWQQcOVl3cmewS4HObl" 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 06:01:52 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --R18NtFvO4RNG2FiWQQcOVl3cmewS4HObl Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2015-05-25 00:32, Paul Vixie wrote: >=20 >=20 > John-Mark Gurney wrote: >> 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... >=20 > yes. but, if the reboot or poweroff or halt command is used, i'd like m= y > bhyve's to have enough time to umount their ufs zvol's. the rc.d script= > should pass along some softer signal that can cause the bhyve to do its= > own clean shutdown. but where SIGTERM is used, which is passed on as > ACPI power-off, i'd like busy (that is, not hung, trying hard to shut > down cleanly) bhyve's to get more time. the current poweroff/halt/reboo= t > command only looks for evidence of paging as a reason to extend the tim= e > between SIGTERM and SIGKILL. i'd like to give it some bhyve-relevant > additional reason to delay that SIGKILL. >=20 One option might be a sysctl to control how much time processes are given between the SIGTERM and SIGKILL. Right now, it looks like, unless paging it detected, processes are only given 5 seconds, which is definitely not enough for bhyve and some other processes. A tunable gives people the option of how long they want to wait. On my laptop, I likely want to shutdown in a hurry, but on my virtualization server, I'm willing to wait a few minutes to keep the shutdown clean. --=20 Allan Jude --R18NtFvO4RNG2FiWQQcOVl3cmewS4HObl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJVYrrNAAoJEJrBFpNRJZKfWGgQAINXV2z3PszdKo4eY3/FIEP0 fqbd1t19enf9Q0aTqoDzKXzSlvpWGi0B/rKgh7XGJsXEdRlZJC6TXpWt8Itkv01J oF+bLVdnjTS32pRS8OEphMdDKdHoWKyjrL+hgsiJPpVcNOdGXn5HSL+P7MLcuuPj Mnb6q07UxdjEiyqBZcjamwOJxXBsuBo+jAsqlYe9OdVV4yY87SqxbDW1uhDn2s4v TvE3wUClbFMjN7z1Sr9zvU4u5qAdI8Lz4g5yDwl8ku1TTB3yWh05kGnlKcpMDEA3 OAm4b1tcKhZueRCCpXP4l0c6r90OLTSpneeHzk3XF6FpHjS8gyE80TVRnP7fqe8C xw8R6ZuMaAV1WsZ60dZO7EXBsDSp1HZ7fbhUsJ6z7YwamzxR8LXI1B7rmxPNEERO vAmcY4WnmHLyMb8zPoF+UPkWm9GTTTbyOCAP5EItee67D8Ffh3xXkHAb8om6PT9H A/sPtYqci2cpNRYQYPUMlFCgr71ej2ArHx/ciEjgdHQ7Yt1JAnpZSNRqpF4QJ6jf r1B+Gpb3CBGwL0TcanosQdieldZBbGZUk83YWDm4pt9XUbLvHPecgiuad7jYwilS CvS5uMILNZ0uZbMI3SsvkWuwuzy7Moo7Xqw9VeYySTQgZMI59Tu1Yr7ad3oYai/Z 3IV9MBNt59TiTz8DE9fA =QcfQ -----END PGP SIGNATURE----- --R18NtFvO4RNG2FiWQQcOVl3cmewS4HObl-- From owner-freebsd-virtualization@FreeBSD.ORG Mon May 25 07:15:47 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 1CE8048D; Mon, 25 May 2015 07:15:47 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CD9217F5; Mon, 25 May 2015 07:15:46 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from jre-mbp.elischer.org (ppp121-45-225-35.lns20.per1.internode.on.net [121.45.225.35]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id t4P7FfY3060158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 25 May 2015 00:15:44 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <5562CC17.70004@freebsd.org> Date: Mon, 25 May 2015 15:15:35 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Allan Jude , freebsd-virtualization@freebsd.org Subject: Re: can we get some interaction between halt/reboot and bhyve? References: <5562755C.8090407@redbarn.org> <20150525030835.GB37063@funkthat.com> <5562A5D0.7050207@redbarn.org> <5562BACA.4040104@freebsd.org> In-Reply-To: <5562BACA.4040104@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 07:15:47 -0000 On 5/25/15 2:01 PM, Allan Jude wrote: > On 2015-05-25 00:32, Paul Vixie wrote: >> >> John-Mark Gurney wrote: >>> 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... >> yes. but, if the reboot or poweroff or halt command is used, i'd like my >> bhyve's to have enough time to umount their ufs zvol's. the rc.d script >> should pass along some softer signal that can cause the bhyve to do its >> own clean shutdown. but where SIGTERM is used, which is passed on as >> ACPI power-off, i'd like busy (that is, not hung, trying hard to shut >> down cleanly) bhyve's to get more time. the current poweroff/halt/reboot >> command only looks for evidence of paging as a reason to extend the time >> between SIGTERM and SIGKILL. i'd like to give it some bhyve-relevant >> additional reason to delay that SIGKILL. >> > One option might be a sysctl to control how much time processes are > given between the SIGTERM and SIGKILL. > > Right now, it looks like, unless paging it detected, processes are only > given 5 seconds, which is definitely not enough for bhyve and some other > processes. A tunable gives people the option of how long they want to > wait. On my laptop, I likely want to shutdown in a hurry, but on my > virtualization server, I'm willing to wait a few minutes to keep the > shutdown clean. you only want more tme if the processes in quetion are likely to respond. I'd suggest that we have a way for a process to set some sort of ' Yeah I got the signal, and I'd like some time to work on it" response. Since the original is a signal there is no back channel but maybe we can think of a suitable method. sysctls, process flags, ... timers? Maybe a per-process timer. You set it to a time by which you promise to be finished and the kernel promises to shoot you in the head if you were lying. Then the existence of the timer inhibits further signals and kicks. the timer could have a maximum setting that is set by sysctl.. so effectively an example might be. set max time to 45 seconds (or whatever) kick (HUP/TERM) all processes processes set their suicide timers to 20 secs and start shutting down. (sets process flag) after 5 seconds rekicks (-9) all processes without said timer running. (process flag?) waits for count of timers to go to 0 (a sysctl?.. decrements when process exits or it fires.) kill -9 all remaining processes.. wait 5 secs.. reboot From owner-freebsd-virtualization@FreeBSD.ORG Wed May 27 01:14:07 2015 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D204348B for ; Wed, 27 May 2015 01:14:07 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-la0-x229.google.com (mail-la0-x229.google.com [IPv6:2a00:1450:4010:c03::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 568D3C05 for ; Wed, 27 May 2015 01:14:07 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by lalw1 with SMTP id w1so11699068lal.0 for ; Tue, 26 May 2015 18:14:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=JtKME1Y8Vs2Bnk6TyWbnxqOzRN8HhBeTa1HZJ3rkeBo=; b=ETJ9XZnKnkU+dHpN1nsdeb1axQ14fH2ac6Po7rWWAEDkEzATqB7dAFEkIUMT+p0scF WEABSz1nVPHKXCPXQZlZloLMKbTbAkqQdc1RrgdfcLL4M6C6G9r7/RpIi5lOEbFuCoCj D6aCeMt8HDptfKLUd5oqmB+tdLGoGAiclYAUFll4lPLsvquj+RYvIKugSXAkjQ1ngzRx NhFEMgMIleQA3HqLIs6Ai3EkSV4vDqLwvqnOQ/gAM33L3cLiBLEzhzUWxk8IDSp6p+9l ykm59UXO/EfWQIauGmQkjfs0vhFdwzWgI1qacxlNryKoLq8KysKOFXTuBoyfc0M21Otv 0veQ== MIME-Version: 1.0 X-Received: by 10.152.3.130 with SMTP id c2mr25856295lac.81.1432689245564; Tue, 26 May 2015 18:14:05 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.164.38 with HTTP; Tue, 26 May 2015 18:14:05 -0700 (PDT) In-Reply-To: <20150525030835.GB37063@funkthat.com> References: <5562755C.8090407@redbarn.org> <20150525030835.GB37063@funkthat.com> Date: Tue, 26 May 2015 18:14:05 -0700 X-Google-Sender-Auth: O43buIBIbwF6W09EM32vQwYx07o Message-ID: Subject: Re: can we get some interaction between halt/reboot and bhyve? From: Craig Rodrigues To: "freebsd-virtualization@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 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: Wed, 27 May 2015 01:14:08 -0000 On Sun, May 24, 2015 at 8:08 PM, John-Mark Gurney wrote: > > 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... > I wrote these rc.d scripts to start and stop bhyve VM's, so that on system shutdown, all bhyve instances started with these scripts are shutdown: https://github.com/freebsd/freebsd-ci/tree/master/vm/scripts/ I haven't tried them, but Michael Dexter has written more comprehensive rc.d scripts from bhyve: http://vmrc.bsd.lv/ rc.d scripts work well if you can live with the normal shutdown process invoking rc.d scripts. For my uses, I can live with shutdown and rc.d. If you want to halt/reboot/poweroff, then you still have the original problem that Paul pointed out. -- Craig From owner-freebsd-virtualization@FreeBSD.ORG Wed May 27 06:19:05 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 91E32761; Wed, 27 May 2015 06:19:05 +0000 (UTC) (envelope-from paul@redbarn.org) Received: from family.redbarn.org (family.redbarn.org [24.104.150.213]) (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 7B98AAE6; Wed, 27 May 2015 06:19:04 +0000 (UTC) (envelope-from paul@redbarn.org) Received: from [192.168.40.38] (unknown [109.235.242.18]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by family.redbarn.org (Postfix) with ESMTPSA id 7BC63184F1; Wed, 27 May 2015 06:18:57 +0000 (UTC) Message-ID: <556561CD.2040201@redbarn.org> Date: Tue, 26 May 2015 23:18:53 -0700 From: Paul Vixie User-Agent: Postbox 3.0.11 (Windows/20140602) MIME-Version: 1.0 To: Craig Rodrigues CC: "freebsd-virtualization@freebsd.org" Subject: Re: can we get some interaction between halt/reboot and bhyve? References: <5562755C.8090407@redbarn.org> <20150525030835.GB37063@funkthat.com> In-Reply-To: X-Enigmail-Version: 1.2.3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Wed, 27 May 2015 06:19:05 -0000 Craig Rodrigues wrote: > ... > > I haven't tried them, but Michael Dexter has written more comprehensive > rc.d scripts from bhyve: > > http://vmrc.bsd.lv/ these look good but i'm waiting for man pages, while meanwhile i bake my own toolset. > rc.d scripts work well if you can live with the normal shutdown process > invoking rc.d scripts. > For my uses, I can live with shutdown and rc.d. so can i except in emergencies. > If you want to halt/reboot/poweroff, then you still have the original > problem that Paul pointed out. reboot.c currently detects paging. is there a way to have it detect disk i/o in general? note, 30 seconds isn't always enough. on a DCC server with 4GB mmap()'d, i've run out of time. so, a sysctl for both the minimum (currently 5 seconds) and maximum (currently 30 seconds) reboot i/o drain period would be great. i would code these and submit them if these changes were welcomed. -- Paul Vixie From owner-freebsd-virtualization@FreeBSD.ORG Wed May 27 09:19:25 2015 Return-Path: Delivered-To: freebsd-virtualization@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45E0212C for ; Wed, 27 May 2015 09:19:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 2F946B1E for ; Wed, 27 May 2015 09:19:25 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t4R9JPui073522 for ; Wed, 27 May 2015 09:19:25 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-virtualization@FreeBSD.org Subject: [Bug 196243] [bhyve] vmrun.sh spurious warning using zvol diskdev Date: Wed, 27 May 2015 09:19:25 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: olgeni@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-virtualization@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Wed, 27 May 2015 09:19:25 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196243 Jimmy Olgeni changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |olgeni@FreeBSD.org --- Comment #1 from Jimmy Olgeni --- CURRENT already has "-e ${virtio_diskdev}", so maybe vmrun.sh can just be merged? -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-virtualization@FreeBSD.ORG Wed May 27 16:25:43 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 D541A7C7 for ; Wed, 27 May 2015 16:25:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 BF66F786 for ; Wed, 27 May 2015 16:25:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t4RGPhim015457 for ; Wed, 27 May 2015 16:25:43 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-virtualization@FreeBSD.org Subject: [Bug 196243] [bhyve] vmrun.sh spurious warning using zvol diskdev Date: Wed, 27 May 2015 16:25:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: neel@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-virtualization@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 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: Wed, 27 May 2015 16:25:43 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196243 Neel Natu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |neel@freebsd.org --- Comment #2 from Neel Natu --- (In reply to Jimmy Olgeni from comment #1) Yes, there are a number of changes that need to be merged before the stable/10 slush. I'll do this one along with the others. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-virtualization@FreeBSD.ORG Thu May 28 19:05:00 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 56025F78; Thu, 28 May 2015 19:05:00 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E422B2B5; Thu, 28 May 2015 19:04:59 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: by wifw1 with SMTP id w1so74296477wif.0; Thu, 28 May 2015 12:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4BEqYbWfULItNfqqXnTcC2Rl+ovR2Qd9yZ7beZmQf7M=; b=bpomwUTjyOEmJM7DKkkjDEGQ0DupQaVbTaMZinFJYekLaLq0N6ymZEJrKiqA4CefXx vKL85w0x4jm4DixTWR0T0StVUXDWMmXQ7BqB/U2jFHcJgag85Psw+iv4/cVwZBSXFCw+ bkiECkoLptpaEqDr0DytTT0FDYA0e9mgwPYWcvM8lWoeGKqDM5xADfZ192hOF6ppr78G Gh3DKsIXLIk3thrYsMYPxBQjbpIUFjGxdou/307YX30y2LTKxqcAApKLO0vgzKRafGnz QG+HMP+U0aVE0YgqX743NVjOXeYVYephywrxxtomw2LEAtIf5mfELWVx4pDpv6GT92iv cMSA== MIME-Version: 1.0 X-Received: by 10.180.85.72 with SMTP id f8mr63076940wiz.62.1432839898470; Thu, 28 May 2015 12:04:58 -0700 (PDT) Received: by 10.27.52.18 with HTTP; Thu, 28 May 2015 12:04:58 -0700 (PDT) In-Reply-To: <556561CD.2040201@redbarn.org> References: <5562755C.8090407@redbarn.org> <20150525030835.GB37063@funkthat.com> <556561CD.2040201@redbarn.org> Date: Thu, 28 May 2015 12:04:58 -0700 Message-ID: Subject: Re: can we get some interaction between halt/reboot and bhyve? From: Neel Natu To: Paul Vixie Cc: Craig Rodrigues , "freebsd-virtualization@freebsd.org" Content-Type: text/plain; charset=UTF-8 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: Thu, 28 May 2015 19:05:00 -0000 Hi Paul On Tue, May 26, 2015 at 11:18 PM, Paul Vixie wrote: > > > Craig Rodrigues wrote: >> ... >> >> I haven't tried them, but Michael Dexter has written more comprehensive >> rc.d scripts from bhyve: >> >> http://vmrc.bsd.lv/ > > these look good but i'm waiting for man pages, while meanwhile i bake my > own toolset. > >> rc.d scripts work well if you can live with the normal shutdown process >> invoking rc.d scripts. >> For my uses, I can live with shutdown and rc.d. > > so can i except in emergencies. > >> If you want to halt/reboot/poweroff, then you still have the original >> problem that Paul pointed out. > > reboot.c currently detects paging. is there a way to have it detect disk > i/o in general? > > note, 30 seconds isn't always enough. on a DCC server with 4GB mmap()'d, > i've run out of time. so, a sysctl for both the minimum (currently 5 > seconds) and maximum (currently 30 seconds) reboot i/o drain period > would be great. i would code these and submit them if these changes were > welcomed. > Yes, please do. best Neel > -- > Paul Vixie > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubscribe@freebsd.org"