Monday, March 04, 2019

Re: Live ACPI "Hibernate" Style Snapshot possible without Powering Down?

On Mon, Mar 04, 2019 at 06:44:15PM -0700, Theo de Raadt wrote:
> Z Ero <zerotetration@gmail.com> wrote:
>
> > Hello,
> >
> > Curious if there is a facility to save system memory state to disk for
> > recovery such as is done the ZZZ (hibernate) command without actually
> > powering down? Could be useful to return to a previous active memory
> > state for devices that are not on UPS or not closely monitored but do
> > preform non-scripted batch work.
> >
> > So, for example if there is a transient power interruption on
> > 03-05-2019 at 12 AM the device could be configured just to reboot to
> > the state it was in at 03-04-2019 at 12 AM where it was doing similar
> > work. I don't mean load a file back up but reload a previous active
> > memory / process state as if returning from hibernate.
> >
> > Thus to enable this hibernate style dumps would be saved periodically
> > by cron for example.
> >
> > I understand that for some dumping active memory to disk without
> > powering down might present a security concern but this is not a
> > problem for my application.
>
> What you are asking for is impossible to do correctly, because files
> will be open. As a result, the filesystem image you return to will be
> incoherent with respect to the open vnodes.
>
> I mean, it can be done. It just will have so many artificial deficits
> at the low-level that it won't suit the high-level purpose you intend
> fully.
>

If one really wanted to do this, the right approach would be to start with
filesystem and memory snapshots in vmm/vmd. I think the former can be done
with enhancing qcow2, and the latter is basically already done (via vmctl
send).

I await OP's diff to implement this.

-ml

No comments:

Post a Comment