Hello,
I migrate VMs from a cluster PVE 3 to a PVE 4.
Ideally, it should use a backup / restore of each VM from the old node proxmox 3 (A), to the new node proxmox 4 (B).
Here's an idea to have very little downtime :
Migrate hard drives between each node with NFS storage, then, stop VM on old node and restart it on the new.
Here a little tuto :
Node B : install and config NFS server.
think nfs storage will be on /var/lib/vz/nfs :
configuration for nfs, add this line to /etc/exports :
then restart the service :
now add this nfs storage on both node with disk image attribute.
Then, for each VM :
- migrate hard drives node A to B by this NFS storage.
- In node B : Copy the VM conf file (or copy / paste to a new file) to /etc/pve/qemu-server, adjusting hard drives line in this file, for pointing to nfs storage, with VM number as folder, like "local storage".
For exemple, if you have :
change it by :
- When migration is finished, shutdown the VM on the node A. When it is stopped, start it on node B.
- Correct "start on boot" option if needed.
- Last migration of hard drive to another storage.
Et voila
certainly useful for other uses.
I migrate VMs from a cluster PVE 3 to a PVE 4.
Ideally, it should use a backup / restore of each VM from the old node proxmox 3 (A), to the new node proxmox 4 (B).
Here's an idea to have very little downtime :
Migrate hard drives between each node with NFS storage, then, stop VM on old node and restart it on the new.
Here a little tuto :
Node B : install and config NFS server.
Code:
apt-get install nfs-kernel-server
think nfs storage will be on /var/lib/vz/nfs :
Code:
mkdir /var/lib/vz/nfs
configuration for nfs, add this line to /etc/exports :
Code:
/var/lib/vz/nfs <ip of client, node A>/24(rw,no_root_squash,anonuid=1000,anongid=1000,sync,no_subtree_check)
then restart the service :
Code:
service nfs-kernel-server restart
now add this nfs storage on both node with disk image attribute.
Then, for each VM :
- migrate hard drives node A to B by this NFS storage.
- In node B : Copy the VM conf file (or copy / paste to a new file) to /etc/pve/qemu-server, adjusting hard drives line in this file, for pointing to nfs storage, with VM number as folder, like "local storage".
For exemple, if you have :
Code:
virtio0: drbdr0:vm-102-disk-1,cache=writethrough,size=165964M
change it by :
Code:
virtio0: nfs:102/vm-102-disk-1,cache=writethrough,size=165964M
- When migration is finished, shutdown the VM on the node A. When it is stopped, start it on node B.
- Correct "start on boot" option if needed.
- Last migration of hard drive to another storage.
Et voila
certainly useful for other uses.