Unable to restore a backup because of timeout when aloccate qcow2 disk

Enrique Garcia Polo

Active Member
Jun 29, 2018
29
1
43
42
Hi all,

I need to restore a dump backup zst of a VM which has a qcow2 format. Seems that my NFS storage is not enough fast to allocate big images, so when I try to restore it, It fails when it try to format the disk image:

Bash:
restore vma archive: zstd -q -d -c /mnt/pve/NFScb1BK/dump/vzdump-qemu-203-2020_12_11-23_30_03.vma.zst | vma extract -v -r /var/tmp/vzdumptmp25493.fifo - /var/tmp/vzdumptmp25493
CFG: size: 425 name: qemu-server.conf
DEV: dev_id=1 size: 214748364800 devname: drive-sata0
CTIME: Fri Dec 11 23:30:06 2020
Formatting '/mnt/pve/NFScb1/images/203/vm-203-disk-0.qcow2', fmt=qcow2 cluster_size=65536 preallocation=metadata compression_type=zlib size=214748364800 lazy_refcounts=off refcount_bits=16
no lock found trying to remove 'create'  lock
TASK ERROR: command 'set -o pipefail && zstd -q -d -c /mnt/pve/NFScb1BK/dump/vzdump-qemu-203-2020_12_11-23_30_03.vma.zst | vma extract -v -r /var/tmp/vzdumptmp25493.fifo - /var/tmp/vzdumptmp25493' failed: error during cfs-locked 'storage-NFScb1' operation: unable to create image: got lock timeout - aborting command

The HD image has 200Gb of size.
Is there any manual method to restore the backup?

I tried to measure time to create manually the image by cli using "time" command:
Bash:
time qemu-img create -f qcow2 -o preallocation=metadata vdisk1 200G
Formatting 'vdisk1', fmt=qcow2 cluster_size=65536 preallocation=metadata compression_type=zlib size=214748364800 lazy_refcounts=off refcount_bits=16

real    4m1.721s
user    0m2.111s
sys     0m0.658s

ls -l
total 209747456
-rw-r--r-- 1 4294967294 4294967294 214781394944 Dec 17 07:55 vdisk1

there is other post with simillar problem: https://forum.proxmox.com/threads/e...k-timeout-aborting-command.65786/#post-312365


Regards
 
Last edited:
Is there any manual method to restore the backup?
It is as seen in the restore. You will need to install the vma binary on the nfs itself if you want to extract it directly.
restore vma archive: zstd -q -d -c /mnt/pve/NFScb1BK/dump/vzdump-qemu-203-2020_12_11-23_30_03.vma.zst | vma extract -v [-r fifo] <targetdir>
Then you need to handle the config files manually
 
Last edited:
I have solved the problem manually doing the following steps from a cluster node shell:
  1. Move backup file zst from Backup Storage to machine image folder main storage NFS with rsync (/mnt/pve/NFScb1/images/203)
  2. Uncompress file with zstd -d file.vma.zst
  3. vma extract file.vma newfolder
  4. Move file.raw to parent directory (/mnt/pve/NFScb1/images/203)
  5. Convert raw to qcow2 format (it is the original format of the machine) using: qemu-img convert -O qcow2 -o preallocation=metadata file.raw vm-203-disk-1.qcow2
  6. delete middle files and run the machine.
I don't know why the restore process create a new file qcow2 and format it, If the raw file is in the vma file, it is only needed to extract and convert it.

In my opinion, the timeout is a problem (because of it's too short) for some of us, It would be great could change that timeout or disable it in punctual cases.
 
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!