blob: 9f5d633216f20b1bec66aa69358ff1394c390d12 [file] [log] [blame] [raw]
.TH vzcptcheck 8 "5 Mar 2013" "OpenVZ" "Containers"
.SH NAME
vzcptcheck \- show/test CPT properties
.SH SYNOPSIS
.SY vzcptcheck
.I property
.OP argument ...
.SY vzcptcheck
.B help
.YS
.SH DESCRIPTION
This low-level utility is used by
.BR vzmigrate (8)
to check if a container can be succesfully restored on a destination system
before performing live migration. Currently, it is able to check CPT version
and CPU flags compatibility.
.P
There are two modes of operation: to show a property and to test a
property. Showing mode is invoked if a property specified with no arguments;
testing mode requires one or many arguments after a property name.
Generally, one runs
.B vzcptcheck
on one node to get a property, and on the other node to check for the
property.
.P
Note that this utility does not guarantee that migration will succeed
even if all tests are passed. It merely gives a way to prevent migration
which will definitely fail.
.SH OPTIONS
.SY vzcptcheck
.B version
.SY vzcptcheck
.B version
.I num
.YS
To get CPT version number, run \fBvzcptcheck version\fR on the source node.
Then, to check if this version number is supported, run
\fBvzcptcheck version \fInum\fR on the destination node.
.SY vzcptcheck
.B caps
.SY vzcptcheck
.B caps
.I ctid
.I capnum
.YS
To get CPU capabilities number, run \fBvzcptcheck caps\fR on the destination
node. Then, to check if a CT can be migrated to node with such a CPU, run
\fBvzcptcheck caps \fIctid capnum\fR on the source node.
.SH EXIT STATUS
In showing mode, returns \fB0\fR upon success, or \fB1\fR in case of an error.
.P
In testing mode, returns \fB0\fR if migration is possible (test passed),
\fB1\fR in case of an error, or \fB2\fR if migration is not possible
(test failed).
.SH EXAMPLES
To check if a CT 123 can be migrated to $DEST, run the following commands
on the source node. Note that error checking is omitted for brevity.
.P
.EX
VEID=123
VERSION=$(vzcptcheck version)
echo Got CPT version: $VERSION
ssh root@$DEST vzcptcheck version $VERSION
echo Version check result: $?
CAPS=$(ssh root@$DEST vzcptcheck caps)
echo Got caps: $CAPS
vzcptcheck caps $VEID $CAPS
echo Caps check result: $?
.EE
.P
If both tests pass, you should get 0 as a result for both checks.
.SH SEE ALSO
.BR vzmigrate (8).
.SH LICENSE
Copyright (C) 2013, Parallels, Inc. Licensed under GNU GPL v2.