Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Apr 2019 22:46:16 +0700
From:      Victor Sudakov <vas@mpeks.tomsk.su>
To:        freebsd-virtualization@freebsd.org
Subject:   Re: [vm-bhyve] Windows 2012 and 2016 servers guests would not stop
Message-ID:  <20190421154616.GA59283@admin.sibptus.ru>
In-Reply-To: <201904211432.x3LEWXqF027753@gndrsh.dnsmgr.net>
References:  <20190421071741.GA51438@admin.sibptus.ru> <201904211432.x3LEWXqF027753@gndrsh.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--Kj7319i9nmIyA2yE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Rodney W. Grimes wrote:
> -- Start of PGP signed section.
> > Jason Tubnor wrote:
> > > On Sun., 21 Apr. 2019, 2:51 pm Victor Sudakov, <vas@mpeks.tomsk.su> w=
rote:
> > >=20
> > > >
> > > >
> > > > Does vm-bhyve provide a way to power them off ungracefully if they =
would
> > > > not stop within a predefined time?
> > > >
> > >=20
> > > You'd have to do your own checking but to force an instant power off =
of a
> > > guest simply execute:
> > >=20
> > > vm poweroff {guest}
> >=20
> > I don't need an *instant* poweroff, I need a poweroff only if a VM would
> > not stop gracefully within a predefined time.
> >=20
> > Of course this should not be done manually but from the rc.d/vm script
> > on shutdown.
>=20
> vm shutdown {guest} &
> (sleep N && vm poweroff {guest}) &
>=20
> A bit hackish, but that should work, if the guest has
> shutdown by the time you get to the poweroff an error
> might occur.  This spawns a few processes, but is
> non blocking and highly parallel.

Thank you, I might give it a try though it would involve hacking the
rc.d/vm script.

> =20
> One thing I noted, you said rc.d/vm, so I am assuming your actually
> using the vm-bhyve port,=20

Yes, I thought that was pretty obvious from the Subject line.

> in which case it has a sequential shutdown
> with time delays between each guest.  vm_delay specifically, and it
> shuts vm's down in reverse order of the startup.
>=20
> That is more likely your problem in that your sending these acpi
> shutdown requests one at a time, and they should be broadcast in
> the "power going out" case.

Whence is the idea that "vm stopall" does a sequential shutdown? What sense
would that make?=20

A sequential startup does make sense but a sequential shutdown? Useless
I think. The man page says that=20

    stopall
             Stop all running virtual machines.  This sends a stop command =
to
             all bhyve(8) instances, regardless of whether they were starti=
ng
             using vm or not.

>=20
> It may be possile to adjust vm_delay to 0 and have that be better,
> though I have not locked at the code.  You may also wish to discuss
> the issue with the vm-bhyve maintainer and maybe a "lights out"
> procedure needs to be added.

Even if there is a single Windows 2012 or 2016 guest running, it takes
the vm several minutes to transition to the "stopped" state.

--=20
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/

--Kj7319i9nmIyA2yE
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJcvJBIAAoJEA2k8lmbXsY0Ip0H/0u28Ug63LC8FdSX6H0JcoWx
SURlIhdncjkbFmBDBmc2HEPrRFbEhkeOFjldaZwDfipMiTNxxx/VK1yiS/0sjlpA
KRE8N03fh19j5PvKBjGaENibPx1VJG8JBDYXJip41UZxbbMyeEF97i9Hl3y0s+w5
9oFhkXZVS+x0kLimSkJhsbtOmpL4/pO+XQ+vR9WLQwWJ7PO43swE7Y0S2H1J4fIB
qL3jSjcklxOt7Dy3fXZz0Ws9HEUdnEyaus9RsDCMGVVwqexuA3kn6dvMNqD0IQj1
mOmEF5xvL6ukK76hJHgE4xIJMsOgB0s7psLpM4o6YYKpfeNcGvTissfZWw/T+58=
=3kM2
-----END PGP SIGNATURE-----

--Kj7319i9nmIyA2yE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190421154616.GA59283>