qmrestore from stdin no longer works on 6.1-11

paul20

Member
May 30, 2018
28
1
8
34
I've been using this command to migrate VMs between nodes but today we upgraded nodes to the latest version and the command no longer works:
Code:
vzdump $vm --stdout | ssh $host@$ip qmrestore - $vm --storage local --force

INFO: sending archive to stdout
INFO: starting kvm to execute backup task
ERROR: couldn't determine format and compression type


Is there anything wrong with the command?

Code:
# pveversion -v
proxmox-ve: 6.1-2 (running kernel: 5.3.18-3-pve)
pve-manager: 6.1-11 (running version: 6.1-11/f2f18736)
pve-kernel-helper: 6.1-9
pve-kernel-5.3: 6.1-6
pve-kernel-5.3.18-3-pve: 5.3.18-3
pve-kernel-5.3.18-2-pve: 5.3.18-2
pve-kernel-5.3.13-1-pve: 5.3.13-1
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.3-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksmtuned: 4.20150325+b1
libjs-extjs: 6.0.1-10
libknet1: 1.15-pve1
libproxmox-acme-perl: 1.0.2
libpve-access-control: 6.0-7
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.1-1
libpve-guest-common-perl: 3.0-10
libpve-http-server-perl: 3.0-5
libpve-storage-perl: 6.1-7
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.2-1
lxcfs: 4.0.3-pve2
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.1-6
pve-cluster: 6.1-8
pve-container: 3.1-4
pve-docs: 6.1-6
pve-edk2-firmware: 2.20200229-1
pve-firewall: 4.1-2
pve-firmware: 3.0-7
pve-ha-manager: 3.0-9
pve-i18n: 2.1-1
pve-qemu-kvm: 4.1.1-4
pve-xtermjs: 4.3.0-1
qemu-server: 6.1-20
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
 
no, this is a bug. fix is already on the way ;)
 
Hi.

Is there any workaround for it ?

I did HDD upgrade of two servers with fresh install of PROXMOX and end up with running hypervisors but without VMs. Unable to Restore backups from WebUI, same error "TASK ERROR: ERROR: couldn't determine format and compression type".

Code:
# pveversion -v
proxmox-ve: 6.1-2 (running kernel: 5.3.18-3-pve)
pve-manager: 6.1-11 (running version: 6.1-11/f2f18736)
pve-kernel-helper: 6.1-9
pve-kernel-5.3: 6.1-6
pve-kernel-5.3.18-3-pve: 5.3.18-3
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.3-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
libjs-extjs: 6.0.1-10
libknet1: 1.15-pve1
libproxmox-acme-perl: 1.0.2
libpve-access-control: 6.0-7
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.1-1
libpve-guest-common-perl: 3.0-10
libpve-http-server-perl: 3.0-5
libpve-storage-perl: 6.1-7
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.2-1
lxcfs: 4.0.3-pve2
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.1-6
pve-cluster: 6.1-8
pve-container: 3.1-4
pve-docs: 6.1-6
pve-edk2-firmware: 2.20200229-1
pve-firewall: 4.1-2
pve-firmware: 3.0-7
pve-ha-manager: 3.0-9
pve-i18n: 2.1-1
pve-qemu-kvm: 4.1.1-4
pve-xtermjs: 4.3.0-1
qemu-server: 6.1-20
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.3-pve1

Thanks in advance.

Regards
MartinT
 
qemu-server 6.2-1 contains the fix. as a workaround you can restore from a file instead of stdin.
 
I did qmrestore from file (*.vma.lzo) and Restore via PROXMOX WebUI, both doesn't work, same error.

apt update; apt upgrade doesn't show qemu-server 6.2-1. And can't find it on pve-no-subscription or pvetest repo (http://download.proxmox.com/debian/pve/dists/buster/pve-no-subscription/binary-amd64/) either.

Did try "apt install qemu-server=6.1-19" (downgrade to previous version - it didn't want downgrade nothing more), unsuccessfully. Downgrade to qemu-server=6.1-14 have unmet dependencies.
 
@fabian: I found your patch, I apply it, but still does not work.

behavior of the original PVE/QemuServer.pm (version 6.1-20):

Code:
# qmrestore /var/lib/vz/dump/vzdump-qemu-10202002_mat_20200505-201556.vma.lzo 10202002 --storage local --force
ERROR: couldn't determine format and compression type
# cat /var/lib/vz/dump/vzdump-qemu-10202002_mat_20200505-201556.vma.lzo |qmrestore - 10202002 --storage local --force
ERROR: couldn't determine format and compression type

and after apply your patch:

Code:
# qmrestore /var/lib/vz/dump/vzdump-qemu-10202002_mat_20200505-201556.vma.lzo 10202002 --storage local --force
ERROR: couldn't determine format and compression type
# cat /var/lib/vz/dump/vzdump-qemu-10202002_mat_20200505-201556.vma.lzo |qmrestore - 10202002 --storage local --force
restore vma archive: vma extract -v -r /var/tmp/vzdumptmp32530.fifo - /var/tmp/vzdumptmp32530
command 'set -o pipefail && vma extract -v -r /var/tmp/vzdumptmp32530.fifo - /var/tmp/vzdumptmp32530' failed: got timeout

It look like it is not only "qmrestore from STDIN" problem, but more general. I will bump new post.

I am still without VMs and need any workaround.

MartinT
Regards
 
obviously restoring backups in general works - it was only STDIN that was broken, hence only that was fixed in my patch. see my reply to the other thread for your other issue!