Page MenuHomeFreeBSD

vmrun: add -x flag to disable reboot loop
Needs ReviewPublic

Authored by rgrimes on Aug 26 2018, 9:31 PM.


Group Reviewers

This adds a -x flag to allow the reboot loop of bhyve(8) to be managed by an external process rather than internally by

Submitted By: Paul Vixie

Diff Detail

rS FreeBSD src repository
Lint OK
No Unit Test Coverage
Build Status
Buildable 19193
Build 18809: arc lint + arc unit

Event Timeline

allanjude created this revision.Aug 26 2018, 9:31 PM

I do not believe this is a desirable change, at least it does not do what it claims it does.


Man pages sayes this is reboot, not sure what the differences are yet. I believe it is actually reset, and you have to do the reboot externally by re running the bhyve(8) command.


There are now exit code of 4, "exited due to an error"


The only case that this new code would trigger on would be if the bhyve exit code is 0, and -x was specified. How does that add any exit information?

Furthermore that would break the reboot while [ 1 ] loop, is that what your trying to achive?

To add information, I have email from Paul Vixie and in fact he is wanting to break the reboot loop with -x so that it can be handled externally.

araujo accepted this revision.Aug 27 2018, 6:20 AM

Personally I'm not a user, but I have no objection related with this change and I don't see anything harmful.

This revision is now accepted and ready to land.Aug 27 2018, 6:20 AM

Allan, would you update the diff please


Per emails with Paul Vixie we have come up with this:

-x Exit reboot loop even if bhyve exits with reboot code

Allan, can you update the diff please


We should probably call this exit_rebootloop, passthrough has a great deal of other context in bhyve.

Hi @allanjude is there anything pending to move this patch forward?

I am back at home now, so I'll get this refreshed

araujo removed a reviewer: araujo.Feb 22 2019, 1:23 AM
This revision now requires review to proceed.Feb 22 2019, 1:23 AM

@allanjude I know your work load is huge as well, if you need me to push a new diff I can do that, but then you have to agree to commit it or I have to pester bde/phk for an approval.


please do make this exit_rebootloop, no doubts in my mind now as to what is going on here, and that this should not be called passthrough due to confusion factor.


Above statement is correct, we should probably fix up the man page to more clearly explain the exit code 0


Adding a note, to above, yes this is trying to break the reboot while [1] loop, ie you want to manage reboots in a loop outside bhyve(8).

rgrimes retitled this revision from vmrun: add -x flag to always exit when bhyve exists to vmrun: add -x flag to disable reboot loop.May 24 2019, 3:33 PM

@rgrimes If you want to commandeer this review and put an updated diff, that would be great.

Note: this was originally submitted by Paul Vixie, it is not my work.

I am happy to commit it, although you are now release from mentorship if you want to commit it yourself, although remember to credit 'Paul Vixie (original version)'

rgrimes commandeered this revision.May 26 2019, 2:57 AM
rgrimes edited the summary of this revision. (Show Details)
rgrimes edited reviewers, added: allanjude; removed: rgrimes.
bcran added a subscriber: bcran.Jun 27 2019, 10:13 PM

I'm going through my list of reviews and noticed this one. Does it need more work, or can it be committed?

jhb added a subscriber: jhb.Jun 27 2019, 11:06 PM
jhb added inline comments.

How about just "disable auto-reboot"


4 already falls into the "all other" comment


And, since the script uses 'exit $bhyve_exit' it does pass through a different exit value to the caller when -x is used (the caller would never see 0 otherwise).