copy a VM from a Proxmox to another

AdminBmq

New Member
Aug 22, 2022
4
0
1
Hello,

It should be a classical question but I didn't find an answer I could understand. I am a total beginer with proxmox.

I have two separated and independent Proxmox with a common PBS for their backups on two different directories.
I wish to copy one of the VM on the other proxmox.

I first thought that creating a new similar VM and restoring a backup would be enough, just a matter of copying the backup on the right directory. Not at all, it seems to be more complicated.
I do not see any export menu for a VM (or even import). What should I do to get a copy of my VM ?

Thanks
 
You don't need to create a new VM first.

To move a VM:
1.) stop a VM on PVE1 and back it up to PBS
2.) go to your PVE2 webUI, select storage view at the left upper corner, select your PBS storage, go to the "Backups" tab, select your Backup and hit the "Restore" button. PVE will then ask what VMID to use and on which storage to restore it. Use the same VMID if you just want to move the VM.
3.) start that restored VM on PVE2 and check that everything is working as expected
4.) delete hat VM from PVE1
 
  • Like
Reactions: datschlatscher
Thanks a lot but I have lost you on the road.

1) ok
2) PVE2 has not access to the PVE1's storage (same PBS, different directories) but I can copy the backup from one directory to the other and I come back to the error cited. A backup seems not enough to get a new VM.

But thanks, I didn't know I could restore a vm through the PBS storage menu (I always did it from the VM) :)
 
In that case you could add the same NFS/SMB share to both nodes. PVE1 then could write a vzdump backup to that NFS/SMB share and PVE2 could restore the backup from it.
Or you make sure that both nodes got unique VMIDs. In that case both PVE nodes could share the same PBS datastore. You would also save some capacity doing that especially when moving guests more often between nodes.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!