Migration strategy

serg1990io

New Member
Nov 20, 2024
5
2
3
Hello!
I have a doubt about the smartest strategy (or just 'best practice') when it comes to move VMs from a server to another.
I have a physical server running Proxmox VE with some virtual machine running in it. This Proxmox is already configured so send backups to a remote PBS.
This server is showing some issues through the diagnostic tools (issues with the backplane) so I wanna move all the VMs to a new host before taking it offline for further investigations.

The new Proxmox VE server is ready (identical to the other one) but I wonder what's the best strategy to move VMs between the two hosts (keeping all the previous backup on PBS valid).
I have two possible ideas:
  • Import VMs on the new Proxmox from PBS
  • Build a cluster between the two servers and start a migration
I guess that the second strategy could be the smartest but since I don't know if the current server with hardware issues will get its hardware fixed I don't know if it's smart to build a cluster with a failing server.
Thank you in advance to whoever will read this!
 
  • Build a cluster between the two servers and start a migration

You don't need that: The qm and put cli tools have a remote-migrate command for that, the new datacenter Manager alpha release is basically a GUI for this ( together with other things):


https://pve.proxmox.com/pve-docs/qm.1.html
https://pve.proxmox.com/pve-docs/pct.1.html


Personally I would try remote-migrate first. If this doesn't work or the new server is on an offsite location PBS would be my second option. Of course in both cases I would do a backup first.


Building a cluster just to destroy it afterwards doesn't feel right for me.
 
Last edited:
I didn't know about this function, thank you very much, I'll look into it!
And also thank you to confirm that build a cluster is probably not the best option in this situation
 
  • Like
Reactions: Johannes S
@Johannes S
For the life of me I can't get that qm remote-migrate command to work. I don't know what the heck it is but it will not work for me.

Code:
qm remote-migrate 100 110 --target-endpoint 'apitoken=PVEAPIToken=root@pam!root-token=<my secret token>,host=<Receiving IP Address>,fingerprint=<Receiving Host pve-ssl.pem fingerprint>' --target-bridge vmbr0 --target-storage Datastore3

If anyone knows what's wrong let me know. This command says there are not enough arguments. Sometimes I get the fingerprint is not recognized when I make slight edits.
 
@Johannes S
For the life of me I can't get that qm remote-migrate command to work. I don't know what the heck it is but it will not work for me.

Code:
qm remote-migrate 100 110 --target-endpoint 'apitoken=PVEAPIToken=root@pam!root-token=<my secret token>,host=<Receiving IP Address>,fingerprint=<Receiving Host pve-ssl.pem fingerprint>' --target-bridge vmbr0 --target-storage Datastore3

You need to specify the target-storage as a mapping like in this example (german forum but example should be clear):
https://debianforum.de/forum/viewtopic.php?t=186538

So I guess you would do something like --target-storage Datastore3:Datastore3 (if both storages are named the same, otherwise adapt accordingly)

I can't test this right know but I remember that i did such a migration between two clusters some months ago although both were on the same local network.
 
You need to specify the target-storage as a mapping like in this example (german forum but example should be clear):
https://debianforum.de/forum/viewtopic.php?t=186538

So I guess you would do something like --target-storage Datastore3:Datastore3 (if both storages are named the same, otherwise adapt accordingly)

I can't test this right know but I remember that i did such a migration between two clusters some months ago although both were on the same local network.
Gave it a shot how they did it but same problem. I also made sure to update both nodes so they should be the same now. Both are on just no subscription updates and same pveversion.