vzmigrate(8)
π vzmigrate(8) β the migrate-a-container-between-two-OpenVZ-servers girlie π
okay bestie, listen β this is the vzmigrate manual page, and I'm about to make it make sense. It's a utility from the Containers section of the manual, and yes, she's iconic.
β¨ NAME β¨
vzmigrate β migrate a container between two OpenVZ servers π¦
πΈ SYNOPSIS πΈ
vzmigrate [-r|--remove-area yes|no] [--ssh=ssh_options] [--ssh-mux]
[--rsync=rsync_options] [--keep-dst] [--live] [-c|--compact]
[-s|--snapshot] [--check-only|--dry-run]
[-f|--nodeps[=check[,check ...]]] [-t|--times] [-v]
destination_address CTID
vzmigrate -h|--help|--usage
π DESCRIPTION π
So this utility migrates a container from one (source) Hardware Node (HN) to another (destination) HN. Main character energy, honestly. The utility can migrate either a stopped or a running container.
- For a stopped container, a simple CT private area transfer is performed (
rsync(1)is used for file transfer, no cap). - For running containers, either traditional migration (with CT stop and start) or live migration is possible.
This program uses ssh as a transport layer. You will need to put the ssh public key on the destination node and be able to connect to the node without entering a password. Like, the whole vibe depends on that, fr fr. π
No password prompts, bestie. Set up those keys. π
π OPTIONS π
-r,--remove-area yes | noβ Whether to remove a container area on the source HN for the successfully migrated container. Default isyes. π--ssh=optionsβ Additional options that will be passed to ssh while establishing a connection to the destination HN.--ssh-muxβ Enable ssh channel multiplexing, establishing and reusing a single ssh connection to the remote server. This speeds up live migration. β‘--rsync=optionsβ Additional options that will be passed torsync(8). You may add options like-zto enable data compression if you are migrating over a slow link. πβ‘οΈπ--keep-dstβ Do not clean the synced destination container private area in case of some error. It makes sense to use this option on big container migration to avoid syncing the container private area again in case some error (on container stop, for example) occurs during the first migration attempt. π--liveβ Perform live migration: instead of restarting a container, checkpoint and restore are used, so there is no container downtime or service interruption. Additional steps are performed to minimize the time when a container is in suspended state. Option--onlinecan be used as a backward-compatible alias. π-c,--compactβ Compact a container image (i.e. runvzctl compact) before migration. Works for ploop only, ignored otherwise.-s,--snapshotβ Create a container snapshot (i.e. runvzctl snapshot) before migration. Works for ploop only, ignored otherwise. πΈ--check-only,--dry-runβ Do not perform actual migration, stop after preliminary checks. This is used to check if a CT can possibly be migrated. Combine with--liveto enable more checks for the live migration case. β¨-f|--nodeps[=check[,check ...]]β Continue migration, ignoring some or all preliminary check failures. Particular checks can be ignored by providing an argument to the--nodepsoption. The following options can be used (comma-separated):cpuβ ignore cpu capabilities check;ipv6β ignore ipv6 module check.
-t,--timesβ At the end of live migration, output various timings for migration stages that affect total suspended CT time. Note that it only makes sense with--live. β±οΈ-vβ Verbose mode. Causesvzmigrateto print debugging messages about its progress. Note that-vautomatically implies-t. Multiple-voptions increase the verbosity. π£οΈ-h|--help|--usageβ Print usage info and exit.
π EXAMPLES π
Migration of CT 101 to 192.168.1.130 with downtime:
vzmigrate 192.168.1.130 101
Online migration of CT 102 to 192.168.1.130:
vzmigrate --live 192.168.1.130 102
β EXIT STATUS β
0EXIT_OKβ Command completed successfully. π1EXIT_USAGEβ Bad command line options. π2EXIT_VE_STOPPEDβ Container is stopped.4EXIT_CONNECTβ Can't connect to destination (source) HN.6EXIT_COPYβ Container private area copying/moving failed.7EXIT_VE_STARTβ Can't start or restore destination CT.8EXIT_VE_STOPβ Can't stop or checkpoint source CT.9EXIT_EXISTSβ Container already exists on destination HN.10EXIT_NOTEXISTβ Container does not exists on source HN.12EXIT_IP_INUSEβ You attempt to migrate CT which IP address(es) are already in use on the destination node.13EXIT_QUOTAβ Operation with CT quota failed.14EXIT_OVZ_NOT_RUNNINGβ OpenVZ is not running, or some required kernel modules are not loaded.15EXIT_APPLY_CONFIGβ Unable to set CT name on destination node.16EXIT_PLOOP_UNSUPβ Ploop is not supported by destination node.17EXIT_UNSUP_CPT_VERβ CPT version incompatibility with the destination node.18EXIT_UNSUP_CPUβ Destination node CPU incompatibility.19EXIT_CANT_READ_REMOTE_CONFIGβ Unable to read remotevz.conf.20EXIT_LOCKEDβ Can't lock container (already locked). π
π«Ά SEE ALSO π«Ά
π COPYRIGHT π
Copyright (C) 2001-2013, Parallels, Inc. Licensed under GNU GPL.
okay that's the whole page, you ate that π
β¨ This little love letter to container migration comes to you from OpenVZ, dated 5 Mar 2013, and it's filed under vzmigrate(8). Go forth and migrate, bestie π¦π
π¦ where this page comes from
- ubuntu jammy: vzctl 4.9.4-6
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms