Page MenuHomeFreeBSD

bhyve: allow for automatic destruction on power-off
ClosedPublic

Authored by kaktus on Jun 23 2020, 5:58 PM.

Details

Summary

Introduce -D flag that allows for the VM to be destroyed on guest initiated power-off by the bhyve(8) process itself.
This is quality of life change that allows for simpler deployments without the need for bhyvectl --destroy.

Requested by: swills

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kaktus created this revision.Jun 23 2020, 5:58 PM
kaktus requested review of this revision.Jun 23 2020, 5:58 PM
grehan accepted this revision.Jun 23 2020, 8:35 PM
grehan added a subscriber: grehan.

Nice change. Don't forget to update the man page.

This revision is now accepted and ready to land.Jun 23 2020, 8:35 PM
kaktus updated this revision to Diff 73551.Jun 23 2020, 10:04 PM
kaktus added a reviewer: manpages.

Update man page.

@grehan happy for a MFC in say 2 weeks after commit to head?

This revision now requires review to proceed.Jun 23 2020, 10:04 PM

happy for a MFC in say 2 weeks after commit to head?

Yep, sounds good.

0mp accepted this revision.Jun 23 2020, 10:12 PM
0mp added a subscriber: 0mp.

LGTM when it comes to the manual.

Also, maybe Relnotes: yes?

This revision is now accepted and ready to land.Jun 23 2020, 10:12 PM

This is a really great, thank you so much! Overall, this looks very good, only noticed one minor question.

usr.sbin/bhyve/bhyverun.c
807 ↗(On Diff #73551)

Not sure 1 still makes sense in this case. It's not indicating a failure or issue of some kind, is it?

swills accepted this revision.Jun 24 2020, 4:59 PM

As mentioned on irc, I believe we're bound by the already defined exit codes, as describes in section EXIT STATUS of bhyve(8).

kib accepted this revision.Jun 25 2020, 11:44 AM
This revision was automatically updated to reflect the committed changes.