From owner-freebsd-virtualization@freebsd.org Wed Apr 24 04:36:59 2019 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48B09158BC04 for ; Wed, 24 Apr 2019 04:36:59 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (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 5814A71EF7 for ; Wed, 24 Apr 2019 04:36:57 +0000 (UTC) (envelope-from vas@mpeks.tomsk.su) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=Q5vdhMaeS+vZQ5MlJ+67WeS22l3U27f/PFQyer8mJeQ=; b=nPnDM63HADi9dFjgYewqmt1O0W TXOLUvjbBkRJc+vkj92tubjnt0yMN0Kr/PfR7LCauLE6F3VfswOCyjcfu6NQdVxc5TOucyTkzN/SF QZIovnaW0YSnKKJd2j34Noul2XAFyKLHI99AH6sAMx7JPRy4D8NnTqd5vnIWms+XVkoI=; Received: from vas by admin.sibptus.ru with local (Exim 4.92 (FreeBSD)) (envelope-from ) id 1hJ9eS-0006pp-Fj for freebsd-virtualization@freebsd.org; Wed, 24 Apr 2019 11:36:56 +0700 Date: Wed, 24 Apr 2019 11:36:56 +0700 From: Victor Sudakov To: freebsd-virtualization@freebsd.org Subject: Re: [vm-bhyve] Windows 2012 and 2016 servers guests would not stop Message-ID: <20190424043656.GA25754@admin.sibptus.ru> References: <20190421045143.GA49101@admin.sibptus.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: <20190421045143.GA49101@admin.sibptus.ru> X-PGP-Key: http://www.dreamwidth.org/pubkey?user=victor_sudakov X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 User-Agent: Mutt/1.11.4 (2019-03-13) Sender: Victor Sudakov X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 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, 24 Apr 2019 04:36:59 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Victor Sudakov wrote: >=20 > I've noticed that it takes too long for Windows 2012 and 2016 servers > guests to shutdown when I issue "vm stopall," several minutes even. >=20 > Does vm-bhyve provide a way to power them off ungracefully if they would > not stop within a predefined time? >=20 > Or is there perhaps a way to tune the guest OSes to react more promptly > to an ACPI shutdown? >=20 > My primary concern is that my UPS and "apcupsd --kill-on-powerfail" give > me about 30 seconds of grace time before the power supply is cut out. It > is not sufficient for the bhyve box to shutdown shutdown properly > because it waits for the guests to shutdown. For the present I think I've found a workaround not directly related to vm-bhyve. I'm going to insert "service vm stop" into the doshutdown() procedure in /usr/local/etc/apcupsd/apccontrol before the actual ${SHUTDOWN}. It should give the VMs sufficient time to shutdown before the actual /sbin/shutdown is executed. >=20 > If you know of a better way to configure apcupsd so that it powers down > the UPS only after all the guest OSes and other daemons are safely down, > I'd appreciate that too. Do you think the above hack would have any negative effects? --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --UugvWAfsgieZRqgk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJcv+foAAoJEA2k8lmbXsY05hEH/jalvFUZkpzL1+U7HnRhdRXs OzyPx/828Jl5Hijk2fD3ton9rTw7VXfHZH6ZVDA6caWfWOD+i6R70XE05cUXBscX tbCEncOA5I1cS8358Bw3CbrzNif3E3imIj67Z9YewV597ulOf77Njo4NJeJH42Jo 5Qsge/i0S6f2FubCOrYXT8PJ42jurD3i8kPRZltCPAMWc093aDP7UeyzoETAO9jI T8QpHcV4pr42EiR6OgWrDyZAfQr9Rdl7Wu+SbC5iuiRqRmiUA99HBJtLg/27534/ Wm1YozFOnohky/WQosa+37sv+g2RFSt9gndJu7M1BX2lVQbuvQTir5AMas3S9Ns= =c5eQ -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--