Re: Graceful shutdown of Bhyve VM?
- In reply to: Rainer_Frädrich : "Re: Graceful shutdown of Bhyve VM?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Jul 2026 13:11:52 UTC
Hey, Sorry for replying to a thread a week late, I haven't been monitoring my email much. One of the benefits of jailing bhyve is that I can automate this easily through bringing the jail up and down whenever I want the vm to come up and down. When the jail is brought up, the bhyve script is ran, and the vm boots automatically, and when the jail is brought down TERM is sent to the process gracefully shutting down the VM. The one thing you need to bare in mind is the default jail timeout (the time it gives the jail to stop before SIGKILL) is only a couple of seconds, which if you are using spinning rust, isn't long enough for an OS to gracefully shutdown. I usually set the timeout to 2 minutes, which I feel is a good middle ground, if a VM can't shutdown within 2 mins there's a problem! Hope this helps, -- Polarian Jabber/XMPP: polarian@icebound.dev