How do I migrate Proxmox 3.x openVZ containers to Proxmox 4.x LXC?

Raúl García

New Member
Sep 5, 2016
1
0
1
47
I have just upgraded one of the Proxmox machines in a cluster from 3.4 to 4.2 following these instructions.

Normal VMs have migrated correctly. We had to change hard drives from virtio to ide so that the machines would detect them but other than that, normal VMs migrated without much problem.

OpenVZ containers on the other hand just appeared in the list of machines in the gui, but they didn't allow me to do anything. I found and removed /etc/pve/nodes/testnode/openvz/xxx.conf and that finally removed it from the GUI.

Then I tried to restore one openvz container into an lxe machine following these instructions but I couldn't. This is what I tried:

  • The manual says that I should restore a previous backup into a new LXE container, but I cannot find that option anywhere in the GUI.
  • I tried to restore using the console with this command: pct restore 236 /mnt/nas/dump/vzdump-openvz-236-2016_08_26-20_53_07.tar.gz but after a while restoring the disk is full (No space left on device). I don't understand why this happens; maybe the uncompressed content plus the base lxc is bigger than the 12GiB I assigned to that machine when it was in openvz?.
  • When that didn't work I created a new lxc container with a similar template (CentOS) on the same ip, but with a bigger disk (20GiB). I then copied the backup file so that it had a valid name for lxc containers (mv /mnt/nas/dump/vzdump-openvz-236-2016_08_26-20_53_07.tar.gz /mnt/nas/dump/vzdump-lxc-236-2016_08_26-20_53_07.tar.gz). Then I tried to restore that backup to the new machine, but it reformatted that machine to 12GiB and I got the exact same result as before (Cannot write: No space left on device).
  • To see if it was just this machine, I tried restoring a machine from another Proxmox host, but it said that that machine already exists on another host.
After that last two tests I guessed that the disk size, the VM's id and the Proxmox host must all be written somewhere in the backup file, but I cannot find it.

How can I restore my old OpenVZ machines into LXC containers?

Edit: I have been able to restore eight machines so far, I just got this error with this machine.
 
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!