Upgrade 3.2 to 4.3 - restoring vzdumps/raw disk images on LXC

Maren

Active Member
Oct 12, 2016
21
1
43
57
I truly wonder why you changed from OpenVZ, it worked well. I liked that the file systems in the containers where accessible from the main machine....

0. I don't want to use raw disk images, as OpenVZ was just amazingly conveninent to rsync directories that changed often, it is also great not to have to go over the network to put files into machines.

Is there any way when I restore a vzdump using pct that I can specify the output not to be a raw file system. LXC supports normal file systems.


1. I can't restore this 32GB vzdump which has a 2.6TB allocation on the disk though not used.

pct restore 203 vzdump-openvz-103-2016_09_01-03_11_06.tar
user config - ignore duplicate vmid '109' in pool 'FileServers'
Formatting '/var/lib/vz/images/203/vm-203-disk-6.raw', fmt=raw size=2684354560000
unable to create image: qemu-img: /var/lib/vz/images/203/vm-203-disk-6.raw: The image size is too large for file format 'raw'

if I am forced to use raw images, how do I get this to work? I only have 2TB of storage free presently and this vzdump is only 32GB

2. Your upgrade instructions actual container data. Whilst creating the 4TB of vzdumps files where copies into the machine and your upgrade instructions caused the data to be deleted and lost.

Your instructions say:
"Then you should purge configuration files from packages which are no longer needed (assuming you already saved your OpenVZ containers)


dpkg --purge vzctl"


"PURGE CONFIGURATION" FILES DOES NOT MEAN, OUR SCRIPT WILL DELETE ALL THE DATA IN YOUR /PRIVATE AND ROOT FOLDERS.

That command does this:

root@:~# w
00:08:32 up 12 min, 2 users, load average: 1.08, 0.86, 0.42
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 10.200.201.112 23:57 6:32 32.31s 32.16s rm -rf /var/lib/vz/private /var/lib/vz/root
root pts/1 10.200.201.112 00:07 0.00s 0.04s 0.00s w
root@:~#

Maybe you should change this to. If you want to delete all your container data type in
dpkg --purge vzctl
 
I truly wonder why you changed from OpenVZ, it worked well. I liked that the file systems in the containers where accessible from the main machine....

0. I don't want to use raw disk images, as OpenVZ was just amazingly conveninent to rsync directories that changed often, it is also great not to have to go over the network to put files into machines.

Is there any way when I restore a vzdump using pct that I can specify the output not to be a raw file system. LXC supports normal file systems.

possible solutions:
- you can use ZFS
- you can use pct mount or pct pull/push to access a container's files
- you can create the volume with size 0 (see below) to force the creation of subvols on directory storages (this is only legacy, and offers the least features)

1. I can't restore this 32GB vzdump which has a 2.6TB allocation on the disk though not used.

pct restore 203 vzdump-openvz-103-2016_09_01-03_11_06.tar
user config - ignore duplicate vmid '109' in pool 'FileServers'
Formatting '/var/lib/vz/images/203/vm-203-disk-6.raw', fmt=raw size=2684354560000
unable to create image: qemu-img: /var/lib/vz/images/203/vm-203-disk-6.raw: The image size is too large for file format 'raw'

if I am forced to use raw images, how do I get this to work? I only have 2TB of storage free presently and this vzdump is only 32GB

You can override the detected volume size when restoring (replace STORAGE with your storage and SIZE with the desired size in GB):

pct restore 203 vzdump-openvz-103-2016_09_01-03_11_06.tar -rootfs STORAGE:SIZE

see http://pve.proxmox.com/pve-docs/pve-admin-guide.html#_backup_and_restore -> "Advanced" Restore Mode for details

2. Your upgrade instructions actual container data. Whilst creating the 4TB of vzdumps files where copies into the machine and your upgrade instructions caused the data to be deleted and lost.

Your instructions say:
"Then you should purge configuration files from packages which are no longer needed (assuming you already saved your OpenVZ containers)


dpkg --purge vzctl"


"PURGE CONFIGURATION" FILES DOES NOT MEAN, OUR SCRIPT WILL DELETE ALL THE DATA IN YOUR /PRIVATE AND ROOT FOLDERS.

That command does this:

root@:~# w
00:08:32 up 12 min, 2 users, load average: 1.08, 0.86, 0.42
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 10.200.201.112 23:57 6:32 32.31s 32.16s rm -rf /var/lib/vz/private /var/lib/vz/root
root pts/1 10.200.201.112 00:07 0.00s 0.04s 0.00s w
root@:~#

Maybe you should change this to. If you want to delete all your container data type in
dpkg --purge vzctl

That is indeed a bit poorly worded, I'll make it more clear (although it does already state that you should only run this if you have already saved your openvz containers).
 

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!