IntroductionRather often, server administration tasks require moving virtual machines (VMs) and containers (CTs) out of the physical host. This could be useful for hardware upgrades/maintenance, for restoring virtual machines and containers after host failure, for improving network configuration, and for better satisfying end-user needs.
Migrating a running virtual machineMigration of a running virtual machine is normally performed the following way:
1. Free disk space, CPU number, and memory amount on the destination host are checked. A progress bar appears and shows “Compatibility checking…” If disk space is not sufficient, the migration stops with an error. If the CPU or memory are not sufficient, the migration may proceed with a warning.
2. A folder for the VM is created on the destination server. All read-only files from the VM folder are copied to the destination folder. Files from source server are not deleted. The progress bar shows “Migration is in progress…Please do not turn source or destination server off or unplug network cables.”
3. The VM on the source server is suspended and the remaining files from the VM folder are copied to the destination folder. The VM folder is deleted from the source server after all files have copied successfully. The progress bar shows “Migration is in progress…Please do not turn source or destination server off or unplug network cables.”
4. The VM disappears from the VM directory on the source server and appears in the VM directory on the destination server.
5. The VM is resumed.
The user can cancel the migration at any stage. All progress will be lost. The VM will remain on source server. All files copied to the destination server will be deleted from it.
NOTE: During the migration progress, the virtual machine changes its status from "running" to "migrating," and during step 3, it becomes unavailable for any interaction. No processes are stopped in the virtual machine during the live migration. Only network connections may be dropped at that time. The expected downtime is about 3 minutes, depending on the virtual machine configuration.
Migrating a stopped virtual machineMigrating a stopped virtual machine means copying its files to another Parallels Server host, removing it from Parallels Management Console on the source node, and registering on the destination one.
Migration procedureThe following command can be used to migrate a virtual machine from the source server to the destination server:
pmigrate v <[src/]ID> v <dst[/ID]> [--location <path>]
The command migrates the specified virtual machine from the source server src to the destination server dst.
If src is omitted, the local server is used.
src and dst must be specified in this format:
pmigrate v 'Test Server' v root:email@example.com/'Test Server' -- location /var/parallels