Rodney W. Grimes wrote:
> -- Start of PGP signed section.
> > Jason Tubnor wrote:
> > > On Sun., 21 Apr. 2019, 2:51 pm Victor Sudakov, <v...@mpeks.tomsk.su> 
> > > wrote:
> > > 
> > > >
> > > >
> > > > Does vm-bhyve provide a way to power them off ungracefully if they would
> > > > not stop within a predefined time?
> > > >
> > > 
> > > You'd have to do your own checking but to force an instant power off of a
> > > guest simply execute:
> > > 
> > > vm poweroff {guest}
> > 
> > I don't need an *instant* poweroff, I need a poweroff only if a VM would
> > not stop gracefully within a predefined time.
> > 
> > Of course this should not be done manually but from the rc.d/vm script
> > on shutdown.
> 
> vm shutdown {guest} &
> (sleep N && vm poweroff {guest}) &
> 
> 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.

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

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.
> 
> 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? 

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

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

> 
> 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.

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

Attachment: signature.asc
Description: PGP signature

Reply via email to