Inherited broken pve 1.9(!), trying to migrate a VM

moeffju

Member
Apr 22, 2019
7
0
21
41
Dear Proxmox forum, I have inherited a (remote) machine running Proxmox 1.9(!), and I want to migrate the VMs to a new PVE 6.x instance.

The system is in a pretty broken state with half-installed Debian packages, and the web frontend is not working. vzdump exists but does not run (Can't locate PVE/RPCEnvironment.pm), apparently a result of a botched run of the old 1.9-to-2.x upgrade script.

All guests are OpenVZ guests with storage in /var/lib/vz/root.

What is the best way to migrate their data out of the old host and into a new VM running on my new PVE 6.x? Naively I would just shut down the guests and tar up their roots and config. But there's a few things I want to double-check before running off:

1. What format does vzdump/vzrestore expect, i.e. what layout should my archives have so I can just restore them with PVE 6?
2. If that is out of the question, how do I mount the storage of a newly created VM to unpack the root in there?
 
Is it sufficient to "emulate" vzdump by doing the following:

1. rsync the VM's root to a new location
2. suspend/shutdown the VM
3. rsync the VM's root again to catch changes
4. copy /etc/vz/conf/${VMID}.conf to /etc/vzdump/vps.conf in the backup dir
5. copy /etc/vz/conf/${VMID}.{mount,umount,start,stop} to /etc/vzdump/vps.(extension).conf in the backup dir
6. tar up the backup dir

Or am I missing anything important?
How do I ensure that uid/gid and file permissions are retained correctly?
 

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!