Changes

Jump to: navigation, search

User Guide/Operations on Containers

2,228 bytes added, 11:09, 28 April 2009
Suspending Container: filled in
== Suspending Container ==
 
OpenVZ allows you to suspend any running Container on the Hardware Node by saving its current state to a special dump file. Later on, you can resume the Container and get it in the same state the Container was at the time of its suspending.
 
In OpenVZ-based systems, you can use the <code>vzctl chkpnt</code> command to save the current state of a Container. For example, you can issue the following command to suspend Container 101:
 
# vzctl chkpnt 101
Setting up checkpoint...
suspend...
dump...
kill...
Container is unmounted
Checkpointing completed succesfully
 
During the command execution, the <code>/vz/dump/Dump.101</code> file containing the entire state of Container 101 is created and the Container itself is stopped.
 
Note: You can set another directory to store dump files for your Containers by changing the value of the DUMPDIR parameter in the OpenVZ global file. Detailed information on the OpenVZ global file and the parameters you can specify in it is provided in the {{man|vz|5}}.
 
At any time, you can resume Container 101 by executing the following command:
 
# vzctl restore 101
Restoring container ...
Starting container ...
Container is mounted
undump...
Adding IP address(es): 192.168.16.3
Setting CPU units: 1000
Configure meminfo: 65536
resume...
Container start in progress...
Restoring completed succesfully
 
The Container state is restored from the <code>/vz/dump/Dump.101</code> file on the Node. Upon the restoration completion, any applications that were running inside Container 101 at the time of its suspending will be running and the information content will be the same as it was when the Container was suspended.
 
While working with dump files, please keep in mind the following:
 
* You can restore the Container dump file on the Source Node, i.e. on the Node where this Container was running before its dumping, or transfer the dump file to another Node and restore it there.
: {{Note|Before restoring a Container from its dump file, please make sure that the file system on the Destination Node is identical to that at the moment of the Container dumping; otherwise, the Container restoration may fail.}}
* You cannot change settings of the suspended Container.
 
== Running Commands in Container ==
<noinclude>{{UG/Footer}}</noinclude>

Navigation menu