Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jul 2026 14:11:52 +0100
From:      Polarian <polarian@polarian.dev>
To:        virtualization@freebsd.org
Subject:   Re: Graceful shutdown of Bhyve VM?
Message-ID:  <20260701141152.256ee3ad@Hydrogen>
In-Reply-To: <DE343D95-BD67-4C03-A111-2D310F3E84AF@raifra.de>
References:  <06b91174-b5d3-4203-9115-75b1e38a805d@ikmail.com> <DE343D95-BD67-4C03-A111-2D310F3E84AF@raifra.de>

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

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


home | help

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