machyve / xhyve

xhyve, a lightweight OS X virtualization solution
Other
6.44k stars 356 forks source link

"reboot" does not reboot #38

Closed jakajancar closed 9 years ago

jakajancar commented 9 years ago

Doing a "sudo reboot" causes the app to exit, not reboot:

The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system reboot
reboot: Restarting system
reboot: machine restart

$
jbergstroem commented 9 years ago

This isn't handled in bhyve either.

xez commented 9 years ago

This is expected. The current model in bhyve is to restart the process, rather than resetting the device state. xhyve will give you a different exit code depending on the shutdown event (VM_SUSPEND_RESET, VM_SUSPEND_POWEROFF, VM_SUSPEND_TRIPLEFAULT, ...).

This is typically handled by the run scripts. For example: http://people.freebsd.org/~neel/bhyve/vmrun.sh

jakajancar commented 9 years ago

Ah, that works. Perhaps even better to leave the caller in control. Thanks.