From owner-freebsd-virtualization@freebsd.org Wed Apr 24 06:52:26 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 5E07C158EDA4 for ; Wed, 24 Apr 2019 06:52:26 +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 CA20C76FC8 for ; Wed, 24 Apr 2019 06:52:25 +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=SrLHSogtPIZxRIjDG5BMaSIUNQ2szVAuXNyyNLEMFTE=; b=llNDoUR8xkevcy++ib+BwCxCez ysKQn/7kTJJqud4F5amYTYaUceXSJzytaH4RcMuN+SOzAms7GTCzTs2vmpQ2i15Qi1GzBMsTlI4FZ HXXnAp2Ja4pF+HMuJsCWV9k4w1N1bQDGHTNiL1ALDZWuOlP1TQV0sYAc/ddAwV8eLpMM=; Received: from vas by admin.sibptus.ru with local (Exim 4.92 (FreeBSD)) (envelope-from ) id 1hJBlX-0007LG-MT for freebsd-virtualization@freebsd.org; Wed, 24 Apr 2019 13:52:23 +0700 Date: Wed, 24 Apr 2019 13:52:23 +0700 From: Victor Sudakov To: freebsd-virtualization@freebsd.org Subject: Re: [vm-bhyve] Windows 2012 and 2016 servers guests would not stop Message-ID: <20190424065223.GA28138@admin.sibptus.ru> References: <20190424043656.GA25754@admin.sibptus.ru> <201904240557.x3O5v6AK041737@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline In-Reply-To: <201904240557.x3O5v6AK041737@gndrsh.dnsmgr.net> 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 06:52:26 -0000 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Rodney W. Grimes 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 wo= uld > > > not stop within a predefined time? > > >=20 > > > Or is there perhaps a way to tune the guest OSes to react more prompt= ly > > > to an ACPI shutdown? > > >=20 > > > My primary concern is that my UPS and "apcupsd --kill-on-powerfail" g= ive > > > 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. > >=20 > > 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 > Make sure it does not do the waitall for pids or your going to > sit here waiting for that to complete for a long time, ie until > all vm's go to power off. In fact, this is my intention to sit here waiting for all VM's to go power = off. I can configure apcupsd to start the doshutdown() routine when there is enough power in the UPS, like maybe for 20-30 minutes. > > > If you know of a better way to configure apcupsd so that it powers do= wn > > > the UPS only after all the guest OSes and other daemons are safely do= wn, > > > I'd appreciate that too. > >=20 > > Do you think the above hack would have any negative effects? >=20 > I think this is a reasonable approach given the current situation. >=20 --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --ikeVEW9yuYc//A+q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJcwAenAAoJEA2k8lmbXsY0K2AH/iGON5bDFbmyWGKoDhf3Y0pG 591ZxJl1/+0XMFbhX9VZ6ZdIwL5LwNtHLo7xvNJMzrvQoG4M8BRAxDDH3I7wGINn g1NVkgpv/crq/vqy3dHjOJq3uiIkySN9HRA9sVg+Wuqbmo3Tx3ZADrq69vUvqYCc GLHmXv/tw06t76q8XkANvKeBizeOkkG8gd3Wr/3wDSG3Jd2vKVa28JpTbFUfj2DS Ybzu6JxKzKrdzjpkLhzNP12H0d7pHLrSKNFfSHdZ1WeBxPUNd0LjKnoUfVn2UIjh UdbRu3PU7cRYoNy/Fa4FFWOJ0cfn8MzG7It88XpkXiQAlu0juwluCU8VwuPOLnI= =ZnO1 -----END PGP SIGNATURE----- --ikeVEW9yuYc//A+q--