Proxmox Remote Migration
These instructions describe a specific procedure for the migration of virtual machines (VMs) and containers (LXC) of a Proxmox host to another node without being a part of a whole cluster.
Function
The remote migration in Proxmox describes the process, in which a virtual machine (VM) or container (LXC) is transferred from one Proxmox host to another, without the hosts involved being part of a common cluster.
The migration takes place over the network, with the VM data being transferred from the source host to the target host. This method is especially helpful in environments, in which a central cluster administration is not possible or not desired, for example, in distributed locations, isolated systems or for migrations between physically separated systems.
Preparation
An API token must be created on the target host for the remote migration in Proxmox. This happens via "Datacenter" → "API-Tokens", where any name can be chosen as the ID and root@pam as the user. Token ID and Secret should be stored securely after creation, as they will be needed for the migration.
After this, the permissions are adapted via "Datacenter" → "Permissions" → "Add" → "API Token Permission". Here, the root directory / is selected as path, the previously created token is stated and the role "Administrator" is assigned.
The fingerprint of the target server is needed at the end. This fingerprint can be called up as follows:
openssl x509 -fingerprint -sha256 -noout -in /etc/pve/nodes/$(hostname)/pve-ssl.pem
-
Creation of API token with any name and "root" user
-
Output of the previously created API token, which must be stored
-
Set permissions for API token
-
Set premission for previously created API token with
/path andAdministratorrole -
Querying the fingerprint of the target server
Execution

Once the above mentioned preparation steps have been completed, you can now start the migration of the VMs to the other node. To migrate the desired VMs or containers, the following command must be executed from which the VMs are migrated:
qm remote-migrate <VMID_QUELLE> <VMID_ZIEL> 'host=<ZIEL_IP>,apitoken=PVEAPIToken=<BENUTZER>@pam!<TOKENNAME>=<API_TOKEN>,fingerprint=<FINGERPRINT>' --target-bridge <NETZWERK_BRIDGE> --target-storage <ZIEL_STORAGE> --online
<VMID_QUELLE>: ID of the migrated VM on the source server<VMID_ZIEL>: desired ID of VM on the target server<ZIEL_IP>: IP address of target Proxmox host<BENUTZER>: username, for exampleroot<TOKENNAME>: name of API token<API_TOKEN>: generated API key<FINGERPRINT>: previously requested fingerprint<NETZWERK_BRIDGE>: for examplevmbr0<ZIEL_STORAGE>: for examplelocal-lvm
Example of a command:

![]() |
Author: Harald Peterhansl Harald Peterhansl has been working at Thomas-Krenn.AG since 2022. As an employee in the Hardware Service department, he is responsible for setting up test environments, testing a wide range of server components, and repairing defective customer systems.
|
|
Translator: Alina Ranzinger Alina has been working at Thomas-Krenn.AG since 2024. After her training as multilingual business assistant, she got her job as assistant of the Product Management and is responsible for the translation of texts and for the organisation of the department.
|


