bhyve vs host suspend/resume

John Baldwin jhb at freebsd.org
Wed Oct 7 21:43:56 UTC 2015


On Tuesday, July 14, 2015 11:33:06 AM Andriy Gapon wrote:
> 
> Not sure if there is anything that bhyve can do about the following, but maybe
> it can.  It seems that that after a host is suspended for several hours and
> resumed while a bhyve VM is running, then time counting becomes rather broken in
> the VM.
> With Linux VMs I observe that date(1) keeps reporting stale pre-suspend time and
> thread scheduling is broken, new processes can not be started, etc.

When I've thought about this, my thoughts were to teach bhyve to support S1/S3
suspend (would just need to reset the RTC on resume, not sure what else might
need to be done on resume.  Ideally the vcpu threads would also idle during
suspend).  You could then wire up a different signal as a virtual sleep button
(similar to how SIGTERM works as a virtual power button) and have hooks in
rc.suspend to 'killall -SIGSUSPEND bhyve' and rc.resume to
'killall -SIGRESUME bhyve' or something like that.

-- 
John Baldwin


More information about the freebsd-virtualization mailing list