This post describes the process of migration from OpenVZ to Proxmox 5.2.

Because the standard migration process with a vzdump and pct restore (link not work with Proxmox 5.

On OpenVZ:

  1. Do NOT STOP the VM (which must be migrated), stop the services (like MySQL and etc…) that can change data.


On Proxmox 5.2 Server:

  1. Create new CT (virtual machine) with the same OS as the virtual machine on which you are going to migrate;
  2. Login in to this virtual machine via ssh;
  3. Install rsync.
  4. Create file /root/exclude.txt with list of exclude dirs on Virtual Machine:
## ONLY FOR Cent 7 /usr/lib64. ***DO NOT USE WITH DEBIAN***
## ONLY FOR Cent 7 /usr/lib. ***DO NOT USE WITH DEBIAN***
  1. Synchronize files of created VM with files on OpenVZ VM. Command:
# rsync --exclude-from="/root/exclude.txt" --delete --numeric-ids -avpogtStlHz --progress -e "ssh -p 22" root@IPADDRESSHERE:/* /
  1. You will also want to make sure you rename the getty target service otherwise you will never get a login prompt after rebooting:
# mv /etc/systemd/system/\@tty2.service /etc/systemd/system/\@tty1.service
  1. Restart the VM;
  2. Enjoy =)



Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *