[lxc-devel] the implementation of lxc-freeze

Serge Hallyn serge.hallyn at ubuntu.com
Mon Jun 10 20:52:17 UTC 2013


Quoting Song Tan (belongtostan at gmail.com):
> Hello everyone,
>   I am new to lxc and right now I am trying to find out how the freeze and
> unfreeze functions are implemented.
>   I have read the  freezer.c file in the lxc source, but I still don't
> quite get it. From my understanding, this should be something about process
> scheduling but I am not sure.  Could someone explain a little bit about the
> implementation of freeze and unfreeze tool? Or is there any document I can
> follow?

It's a bit confusing because lxc-freeze doesn't itself freeze the
container, rather it sends a command to the monitor - the process which
cloned the container - asking it to freeze the container.

The actual freezing is simply done by writing 'FROZEN' into the
freezer.state file for the container init.

-serge




More information about the lxc-devel mailing list