Difference between revisions of "Man/vzcptcheck.8"

From OpenVZ Virtuozzo Containers Wiki
< Man
Jump to: navigation, search
(Automated import of articles)
 
(Automated import of articles *** existing text overwritten ***)
 
Line 109: Line 109:
  
 
<p><b>caps</b> <i>ctid capnum</i></p></td>
 
<p><b>caps</b> <i>ctid capnum</i></p></td>
 +
<td width="48%">
 +
</td></tr>
 +
<tr valign="top" align="left">
 +
<td width="11%"></td>
 +
<td width="15%">
 +
 +
<p><b>vzcptcheck</b></p></td>
 +
<td width="2%"></td>
 +
<td width="24%">
 +
 +
<p><b>caps</b> <i>capnum</i></p></td>
 
<td width="48%">
 
<td width="48%">
 
</td></tr>
 
</td></tr>
Line 115: Line 126:
 
<p style="margin-left:11%;">To get CPU capabilities number,
 
<p style="margin-left:11%;">To get CPU capabilities number,
 
run <b>vzcptcheck caps</b> on the destination node. Then, to
 
run <b>vzcptcheck caps</b> on the destination node. Then, to
check if a CT can be migrated to node with such a CPU, run
+
check if a running CT can be live migrated to a node with
<b>vzcptcheck caps</b> <i>ctid capnum</i> on the source
+
such a CPU, run <b>vzcptcheck caps</b> <i>ctid capnum</i> on
node.</p>
+
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 <i>ctid</i>: <b>vzcptcheck caps</b>
 +
<i>capnum</i>.</p>
  
 
== EXIT STATUS ==
 
== EXIT STATUS ==
Line 157: Line 171:
  
 
<p style="margin-left:11%; margin-top: 1em">Copyright (C)
 
<p style="margin-left:11%; margin-top: 1em">Copyright (C)
2013, Parallels, Inc. Licensed under GNU GPL v2.</p>
+
2013-2015, Parallels, Inc. Licensed under GNU GPL v2.</p>

Latest revision as of 18:21, 23 April 2015

NAME[edit]

vzcptcheck − show/test CPT properties

SYNOPSIS[edit]

vzcptcheck

property [argument ...]

vzcptcheck

help

DESCRIPTION[edit]

This low-level utility is used by 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.

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 vzcptcheck on one node to get a property, and on the other node to check for the property.

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.

OPTIONS[edit]

vzcptcheck

version

vzcptcheck

version num

To get CPT version number, run vzcptcheck version on the source node. Then, to check if this version number is supported, run vzcptcheck version num on the destination node.

vzcptcheck

caps

vzcptcheck

caps ctid capnum

vzcptcheck

caps capnum

To get CPU capabilities number, run vzcptcheck caps on the destination node. Then, to check if a running CT can be live migrated to a node with such a CPU, run vzcptcheck caps ctid capnum 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 ctid: vzcptcheck caps capnum.

EXIT STATUS[edit]

In showing mode, returns 0 upon success, or 1 in case of an error.

In testing mode, returns 0 if migration is possible (test passed), 1 in case of an error, or 2 if migration is not possible (test failed).

EXAMPLES[edit]

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.

   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: $?

If both tests pass, you should get 0 as a result for both checks.

SEE ALSO[edit]

vzmigrate(8).

LICENSE[edit]

Copyright (C) 2013-2015, Parallels, Inc. Licensed under GNU GPL v2.