Disaster recovery

orcun

New Member
Aug 22, 2024
6
4
3
Hello to all out there

ı was just trying for a disaster recovery scenario; installed proxmox ,and attached a NFS storage to that proxmox, and installed some vms into that NFS share.
And later on , i want to run those vms on another proxmox server (simulating a server failure) ;

how can i achive that, install a new proxmox server then , attached NFS to that server , and then???? (qm import ) is this correct way?

i was thing about a much faster was like "register vm " in vmware ;

any ideas?

thanks

Note:after that NFS , i will be trying to solve the restore mystery with different storage options ,:)
 
It depends if you made a proxmox cluster of your pve nodes or if that are individual pve installations:
In cluster you would define ha for the vm, power off pve1 with running on and then the vm will auto-start on pve2.
By individual pve's (or individual clusters) you should define to individual share path to your 2 pve's but could be in 1 filesystem, (reflink-) cp vm image from pve1 path into pve2 path, restore from any kind of backup source (or other cluster) /etc/pve/qemu-server/<vmid>.conf (or create new vm and insert after your new image path), maybe need some more network config, depends on your pve network location, start the vm.
 
Last edited:
Thanks Waltar for response ;

what i had done is using this command
"qm disk import 121 /mnt/pve/NFS100YYYY/images/105/vm-105-disk-0.qcow2 local"
it gave error (storage local does not support vm images) and then i dediced to import it to local-thin storage with this
"qm disk import 121 /mnt/pve/NFS100YYYY/images/105/vm-105-disk-0.qcow2 local-lvm" which was Ok ,

so i re-order the vm boot option ,and attached that unsed disk to vm 121 , and can start it .

But i suppose that ,there must be a easier way to achive this,
 
But i suppose that ,there must be a easier way to achive this,
Yes. have your servers in a cluster.

If you want to have a more formalized method for a true DR, you would need to keep your servers synchronized, either synchronously or on a periodic basis (data and configuration) along with a matching internal IP structure and NAT to repoint your VMs at their new remote IP addresses. There are multiple ways of doing this depending on the underlying filesystem; in your case I would use something like scheduled lvmsync for virtual disks and rsync for configuration.

On failure, the remote site will be ready to go without any preamble.
 
When you have both single pve's attached to your NFS you just need cp to other path (which is just for saving images in case of double use of vmid) and not qm disk import. If you use vmid eg. 1000-1999 for pve1 and 2000-2999 for pve2 in same share you even can do a move instead of a copy.