[PVE-User] qmrestore stopped working for filename restrictions
f.gruenbichler at proxmox.com
Wed Jul 8 11:47:46 CEST 2020
> Simone Piccardi via pve-user <pve-user at lists.proxmox.com> hat am 08.07.2020 10:53 geschrieben:
> pve-user mailing list
> pve-user at lists.proxmox.com
> I have a problem with qmrestore not working on some dump filenames, it
> worked some time ago, but with the last version:
> # pveversion
> pve-manager/6.2-6/ee1d7754 (running kernel: 5.4.44-1-pve)
> I got:
> # qmrestore vzdump-qemu-fuss-server-10.0-latest.vma.lzo 110 -unique
> -storage local-lvm
> ERROR: couldn't determine archive info from
> I found that the problem is that the name do not follow an expected
> naming scheme (renaming the file as
> vzdump-qemu-000-0000_00_00-00_00_00.vma.lzo works fine). It work also if
> I make /var/lib/vz/dump/vzdump-qemu-fuss-server-10.0-latest.vma.lzo a
> simbolic link to vzdump-qemu-000-0000_00_00-00_00_00.vma.lzo, and I find
> this quite strange).
> Anyway that error message is at least misleading: if the problem is the
> filename not having a right name, just tell this: from the message
> wording at first I thinked the file was corrupted.
how is it misleading? we tried to determine the archive info (backup time, format, compression, backed-up guest ID and type) from the file name, and were not able to..
> But then I do not undertstand why this restriction suddenly come up, and
> what's the problem of restoring a VM from a file having a more
> descriptive name.
the code was refactored to allow re-use of the same logic in more places, was initially to strict, got relaxed, but not as far as your use case ;)
> That one I'm restoring is a template image I'm distributing, I'd like to
> avoid names like vzdump-qemu-000-0000_00_00-00_00_00.vma.lzo.
> I tried also to overcame the restriction using the standard input as the
> source but I got a different error:
> # cat /var/lib/vz/dump/vzdump-qemu-fuss-server-10.0-latest.vma.lzo|
> qmrestore - 110 -unique -storage local-lvm
> restore vma archive: vma extract -v -r /var/tmp/vzdumptmp31864.fifo -
> command 'set -o pipefail && vma extract -v -r
> /var/tmp/vzdumptmp31864.fifo - /var/tmp/vzdumptmp31864' failed: got timeout
in that case you need to pipe in the extracted vma, not the compressed one.
> Is there a way to restore a file dump avoiding to rename it?
yes and no. currently you need at least the prefix 'vzdump-qemu-\d+-', e.g. 'vzdump-qemu-0' if you want to use a VMID that is not usable in general and thus not colliding. I see no reason why this could not be relaxed further to allow the full 'vzdump-qemu-*.FILEXTENSION' though, so I'll send a patch shortly to do just that.
More information about the pve-user