| .TH vzcptcheck 8 "21 Apr 2015" "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 |
| .SY vzcptcheck |
| .B caps |
| .I capnum |
| .YS |
| To get CPU capabilities number, run \fBvzcptcheck caps\fR on the destination |
| node. Then, to check if a running CT can be live migrated to a node |
| with such a CPU, run \fBvzcptcheck caps \fIctid capnum\fR on the source node. |
| To check if a suspended container can be migrated (i.e. it can be restored |
| on the destination node), use the form without \fIctid\fR: |
| \fBvzcptcheck caps \fIcapnum\fR. |
| .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-2015, Parallels, Inc. Licensed under GNU GPL v2. |