vzmigrate

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
MIGRATION
NOTES
EXAMPLES
EXIT STATUS
SEE ALSO
COPYRIGHT

NAME

vzmigrate - utility for migration Containers between hardware nodes.

SYNOPSIS

vzmigrate [-r yes|no] [-sfvh] [--keeper[=<veid>]] [--ssh=<ssh options>]
[--keep-dst] [--online] [--noiter] [--readonly] [--require-realtime]
[--dry-run] [--new-id=<CT ID>] [--new-name=<CT name>]
[--new-private=<CT private>] [--new-root=<CT root>] [--nonsharedfs]
[--whole-file] [--timeout]
<[user@]destination_node_address> {CT List}
{CT List} =
<source CT ID>[:<dst CTID>[:<dstCT private>[:<dstCT root>]]] [...]

without --new-id, --new-name, --new-private, --new-root option(s), and

{CT List} = <source CT ID>

otherwise

DESCRIPTION

This utility is used for CT(s) migrating from one (source) node to another (destination) node.
{CT List}
- List of containers for migration. You may specify

dst CT ID, if you want to change CT ID after migration. Also you can change dstCT private and dstCT root paths.

OPTIONS

−s, --nostart

Do not attempt to restore CT state (start/mount CT) after successful migration on destination node, when it was running/mounted on source node. It means that CT should be started/mounted manually on the destination node. Option doesn’t affect CT that was stopped at the migration time.

−r, --remove-area yes|no

Remove/Don’t Remove private area on source node for successfully migrated CT. Private area will save with .migrated suffix. Command-line option overrides configuration parameter REMOVEMIGRATED in @PRODUCT_NAME_LONG@ config file (see vz(5)).

−f,
--nodeps
[=[all][,cpu_check][,disk_space][,technologies][,license][,rate][,bindmount][,template_area_sync][,kernel_modules]]

Ignore an absence of required package sets on destination node. To prevent CT against errors in filesystem due to absent template files, it will not be started on destination node after migration and must be started manually.
Additional parameters:
all
- as is -f.
cpu_check
- to pass check of the cpu capabilities.
disk_space
- to pass check of the disk usage.
technologies
- to pass check of the used technologies.
license
- to pass check of the license.
rate
- to pass check of the RATE config parameters.
bindmount
- to pass check of the external bind mounts in config.

−h, --help

Get usage info.

−-ssh=<ssh options>

Additional options that will be passed ssh during establishing connection with destination node. Please be carefully with passed options, DON’T pass destination hostname.

−-keeper[=<veid>]

Keeper CT identification, Service CT ID used if not specified. Keeper CT is needed to keep CT IP addresses during migration (it used for example to show web page that CT in stage of migration).

−-keep-dst

Don’t clean synced destination CT private area in case of some error. It is usefull to use this option on big CT migration to protect of syncing CT private area again in case of some error (on CT stop for example) occured during first migration attempt.

−-online

Perform online (zero-downtime) migration: during the migration the CT hangs for a while and after the migration it continues working as though nothing has happened. Options --keeper and --nostart are ignored if this option is set. By default iterative scheme is used for online migration, that is most of the CT memory are transfered before CT suspend. This method introduces the smallest delay in service.

−-noiter

Do not use iterative scheme during online migration.

−-readonly

Do not locking and use write functions on source CT.

−-require-realtime

Force to use only realtime scheme for online migration. Migration fails if this method is not available for some reason. It is useful to be sure that delay in service will be the smallest.

−-dry-run

Option that will perform only checks and will not perform actual data transfer.

−-new-id=<CT ID>

Set destination CT ID.

−-new-name=<CT name>

Set destination CT name.

−-new-private=<CT private>

Set destination CT private.

−-new-root=<CT root>

Set destination CT root.

−-nonsharedfs

Option that will force migrate of CT private from shared partition on non-shared.

−W, --whole-file

Use rsync --whole-file option.

−t, --timeout <value>

Set connection timeout in seconds.

−-nocompress

Do not compress disk image data on online ploop migration.

−-convert-vzfs

Convert the file system of a Container from VZFS to ext4.

−v, --verbose

Print verbose information.

MIGRATION

Utility can migrate either stopped or running CT. For stopped CT, simple CT private area transfer is performed (rsync(1) is used for file transferring). For running CTs the migration may be slow (with minute or longer downtime), fast (seconds of downtime) or online (zero-downtime). For the fast migration the kernel support for VZFS tracking is required. For the online migration kernel support of CPT is required. Utility also can migrate shared CTs, in this case it attempts to find suitable (templates set coincides with one of source CT) shared base CT on destination side, in case of failure it copies source shared base on destination side.

NOTES

If you want to migrate CT in bounds of one hardware node, you shouldn’t use this utility, use vzmlocal(8) instead.

You can set disk IO limits for migrating Containers by configuring the VZ_TOOLS_BCID and VZ_TOOLS_IOLIMIT parameters in the global configuration file (/etc/vz/vz.conf, see vz(5)).

EXAMPLES

To migrate CT#101 as CT#1001 to 192.168.1.130 by user "test":

vzmigrate test@192.168.1.130 101:1001

EXIT STATUS

0

Command completed successfully.

1

Bad command line options.

2

System error.

3

Can’t lock CT.

4

Can’t connect to destination (source) node.

5

CT is broken or improper.

6

CT private area copying/moving failed.

7

Can’t start destination CT.

8

Can’t stop source CT.

9

CT already exists on destination node.

10

CT doesn’t exist on source node.

11

Failed package sets dependencies. Use -f options to forcedly migrate such CT, CT will not be started on destination side.

12

You attempt to migrate CT which IP addresses already in use (there is running CT) on destination node. Use -f options to forcedly migrate such CT, CT will not be started on destination side.

13

You attempt to migrate CT that contains mount script. Use -f options to forcedly migrate such CT, CT will not be started on destination side.

21

Connection to remote host is broken.

22

Connection to remote host closed due to timeout.

25

Programm terminated.

26

Migrate protocol error.

27

Failed to access template directory.

29

Clone is forbidden for suspended CT.

30

License check failed.

31

Disk space check failed.

32

Technologies check failed for destination node.

33

Rate check filed.

34

Source and destination CTs are equals.

35

UUID-collision, directory already exits.

36

CT config contains bind mount.

37

This CT layout is not supported on destination node.

38

This CT format is not supported on destination node.

39

Can’t get source CT format.

40

Can’t migrate vzcache2 area (old protocol).

41

Can’t migrate suspended CT (old protocol).

43

libvzctl error.

45

This name already used by other CT.

46

CT private directory on the destination node resides on the non-shared partition, use --nonsharedfs option to force copying CT private data.

48

Can not perform online migration to/from elder version.

49

Too long message

52

External program failed

56

Insufficient cpu capabilities on destination node

57

CT has unsupported features

61

The IPv6 module is not loaded on the destination node.

62

The SLM module is not loaded on the destination node.

63

Mounting namespaces in the container is not allowed by the destination node kernel.

104

--dry-run option was used.

SEE ALSO

rsync(1), vzmsrc(8), vzmlocal(8), vz(5)

COPYRIGHT

Copyright (c) 2001-@LAST_COPYRIGHT_YEAR@, @COPYRIGHT_OWNER@. All rights reserved.