Template Backup Failing - Exit Code 1

bigun89

Member
Jan 28, 2022
36
1
13
44
I have a backup job that backs up the entire Proxmox server. So far I have 3 VM's and a template. ID's 100, 101, 102, and 901 respectively.

All three machines are backing up fine, but the template (901) is failing.

Code:
INFO: ionice priority: 7
INFO: VM Name: WindowsServer2022
INFO: include disk 'scsi0' 'vmstorage:901/base-901-disk-2.qcow2' 40G
INFO: include disk 'efidisk0' 'vmstorage:901/base-901-disk-0.qcow2' 528K
INFO: include disk 'tpmstate0' 'vmstorage:901/base-901-disk-1.raw' 4M
INFO: creating Proxmox Backup Server archive 'vm/901/2022-02-11T14:52:51Z'
INFO: starting kvm to execute backup task
ERROR: Backup of VM 901 failed - start failed: command 'swtpm_setup --tpmstate file:///mnt/vmstorage/images/901/base-901-disk-1.raw --createek --create-ek-cert --create-platform-cert --lock-nvram --config /etc/swtpm_setup.conf --runas 0 --not-overwrite --tpm2 --ecc' failed: exit code 1
INFO: Failed at 2022-02-11 09:52:51
INFO: Backup job finished with errors
TASK ERROR: job errors

Running the failed command manually on the proxmox server doesn't seem to yield anything useful:

Code:
root@proxmox1:~# swtpm_setup --tpmstate file:///mnt/vmstorage/images/901/base-901-disk-1.raw --createek --create-ek-cert --create-platform-cert --lock-nvram --config /etc/swtpm_setup.conf --runas 0 --not-overwrite --tpm2 --ecc
root@proxmox1:~#

Code:
root@proxmox1:~# pveversion -v
proxmox-ve: 7.1-1 (running kernel: 5.13.19-4-pve)
pve-manager: 7.1-10 (running version: 7.1-10/6ddebafe)
pve-kernel-helper: 7.1-10
pve-kernel-5.13: 7.1-7
pve-kernel-5.13.19-4-pve: 5.13.19-9
pve-kernel-5.13.19-2-pve: 5.13.19-4
ceph-fuse: 15.2.15-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.22-pve2
libproxmox-acme-perl: 1.4.1
libproxmox-backup-qemu0: 1.2.0-1
libpve-access-control: 7.1-6
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.1-2
libpve-guest-common-perl: 4.0-3
libpve-http-server-perl: 4.1-1
libpve-storage-perl: 7.1-1
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.11-1
lxcfs: 4.0.11-pve1
novnc-pve: 1.3.0-1
proxmox-backup-client: 2.1.5-1
proxmox-backup-file-restore: 2.1.5-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.4-5
pve-cluster: 7.1-3
pve-container: 4.1-3
pve-docs: 7.1-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.3-5
pve-ha-manager: 3.3-3
pve-i18n: 2.6-2
pve-qemu-kvm: 6.1.1-1
pve-xtermjs: 4.16.0-1
qemu-server: 7.1-4
smartmontools: 7.2-1
spiceterm: 3.2-2
swtpm: 0.7.0~rc1+2
vncterm: 1.7-1
zfsutils-linux: 2.1.2-pve1
 
Last edited:
  • Like
Reactions: burly
I'm experiencing similar for my Windows 2022 and Windows 11 VM templates:

Code:
INFO: Starting Backup of VM 532 (qemu)
INFO: Backup started at 2022-03-28 03:24:42
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: win11x64
INFO: include disk 'virtio0' 'truenas-nfs:532/base-532-disk-1.qcow2' 32G
INFO: include disk 'efidisk0' 'truenas-nfs:532/base-532-disk-0.qcow2' 528K
INFO: include disk 'tpmstate0' 'truenas-nfs:532/base-532-disk-0.raw' 4M
INFO: creating Proxmox Backup Server archive 'vm/532/2022-03-28T07:24:42Z'
INFO: starting kvm to execute backup task
ERROR: Backup of VM 532 failed - start failed: command 'swtpm_setup --tpmstate file:///mnt/pve/truenas-nfs/images/532/base-532-disk-0.raw --createek --create-ek-cert --create-platform-cert --lock-nvram --config /etc/swtpm_setup.conf --runas 0 --not-overwrite --tpm2 --ecc' failed: exit code 1
INFO: Failed at 2022-03-28 03:24:42


Code:
root@pve4:~# pveversion -v
proxmox-ve: 7.1-1 (running kernel: 5.13.19-6-pve)
pve-manager: 7.1-11 (running version: 7.1-11/8d529482)
pve-kernel-helper: 7.1-13
pve-kernel-5.13: 7.1-9
pve-kernel-5.13.19-6-pve: 5.13.19-14
pve-kernel-5.13.19-3-pve: 5.13.19-7
pve-kernel-5.13.19-2-pve: 5.13.19-4
ceph-fuse: 15.2.15-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.22-pve2
libproxmox-acme-perl: 1.4.1
libproxmox-backup-qemu0: 1.2.0-1
libpve-access-control: 7.1-6
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.1-5
libpve-guest-common-perl: 4.1-1
libpve-http-server-perl: 4.1-1
libpve-storage-perl: 7.1-1
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.11-1
lxcfs: 4.0.11-pve1
novnc-pve: 1.3.0-2
proxmox-backup-client: 2.1.5-1
proxmox-backup-file-restore: 2.1.5-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.4-7
pve-cluster: 7.1-3
pve-container: 4.1-4
pve-docs: 7.1-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.3-6
pve-ha-manager: 3.3-3
pve-i18n: 2.6-2
pve-qemu-kvm: 6.1.1-2
pve-xtermjs: 4.16.0-1
qemu-server: 7.1-4
smartmontools: 7.2-1
spiceterm: 3.2-2
swtpm: 0.7.1~bpo11+1
vncterm: 1.7-1
zfsutils-linux: 2.1.2-pve1
 
Last edited:
I am experiencing this problem with a template with a virtual TPM. If I detach the TPM the backup succeeds.

I'm running as root@pam.

Code:
INFO: starting new backup job: vzdump 100 --all 0 --notes-template '{{guestname}}' --mailnotification always --prune-backups 'keep-daily=14' --mailto [REDACTED] --storage backups --mode snapshot --node [REDACTED] --compress zstd
INFO: Starting Backup of VM 100 (qemu)
INFO: Backup started at 2022-06-22 12:19:43
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: template-[REDACTED]-Windows10Pro
INFO: include disk 'scsi0' 'vm-disks:100/base-100-disk-3.qcow2' 200G
INFO: include disk 'scsi1' 'vm-disks:100/base-100-disk-4.qcow2' 1T
INFO: include disk 'tpmstate0' 'vm-disks:100/base-100-disk-1.raw' 16896
INFO: creating vzdump archive '/zfs-1/backups/dump/vzdump-qemu-100-2022_06_22-12_19_43.vma.zst'
INFO: starting template backup
INFO: /usr/bin/vma create -v -c /zfs-1/backups/dump/vzdump-qemu-100-2022_06_22-12_19_43.tmp/qemu-server.conf exec:zstd --rsyncable --threads=1 > /zfs-1/backups/dump/vzdump-qemu-100-2022_06_22-12_19_43.vma.dat drive-scsi0=/zfs-1/vm-disks/images/100/base-100-disk-3.qcow2 drive-scsi1=/zfs-1/vm-disks/images/100/base-100-disk-4.qcow2 drive-tpmstate0-backup=/zfs-1/vm-disks/images/100/base-100-disk-1.raw
INFO: progress 0% 0/1314260009472 0
INFO: vma: warning: vma_writer_close failed read error
INFO: image drive-scsi0: size=214748364800 zeros=0 saved=214748364800
INFO: image drive-scsi1: size=1099511627776 zeros=0 saved=1099511627776
INFO: image drive-tpmstate0-backup: size=16896 zeros=0 saved=16896
INFO: vma: creating vma archive failed
ERROR: Backup of VM 100 failed - command '/usr/bin/vma create -v -c /zfs-1/backups/dump/vzdump-qemu-100-2022_06_22-12_19_43.tmp/qemu-server.conf 'exec:zstd --rsyncable --threads=1 > /zfs-1/backups/dump/vzdump-qemu-100-2022_06_22-12_19_43.vma.dat' 'drive-scsi0=/zfs-1/vm-disks/images/100/base-100-disk-3.qcow2' 'drive-scsi1=/zfs-1/vm-disks/images/100/base-100-disk-4.qcow2' 'drive-tpmstate0-backup=/zfs-1/vm-disks/images/100/base-100-disk-1.raw'' failed: got signal 5
INFO: Failed at 2022-06-22 12:19:43
INFO: Backup job finished with errors
TASK ERROR: job errors

pveversion -v
Code:
proxmox-ve: 7.2-1 (running kernel: 5.15.35-1-pve)
pve-manager: 7.2-4 (running version: 7.2-4/ca9d43cc)
pve-kernel-5.15: 7.2-4
pve-kernel-helper: 7.2-4
pve-kernel-5.15.35-2-pve: 5.15.35-5
pve-kernel-5.15.35-1-pve: 5.15.35-3
pve-kernel-5.15.30-2-pve: 5.15.30-3
ceph-fuse: 15.2.16-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve1
libproxmox-acme-perl: 1.4.2
libproxmox-backup-qemu0: 1.3.1-1
libpve-access-control: 7.2-2
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.2-2
libpve-guest-common-perl: 4.1-2
libpve-http-server-perl: 4.1-2
libpve-storage-perl: 7.2-4
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.12-1
lxcfs: 4.0.12-pve1
novnc-pve: 1.3.0-3
proxmox-backup-client: 2.2.3-1
proxmox-backup-file-restore: 2.2.3-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.5.1
pve-cluster: 7.2-1
pve-container: 4.2-1
pve-docs: 7.2-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.4-2
pve-ha-manager: 3.3-4
pve-i18n: 2.7-2
pve-qemu-kvm: 6.2.0-10
pve-xtermjs: 4.16.0-1
qemu-server: 7.2-3
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.7.1~bpo11+1
vncterm: 1.7-1
zfsutils-linux: 2.1.4-pve1

qm config 100
Code:
agent: 1
boot: order=scsi0
cores: 4
machine: pc-i440fx-6.2
memory: 8192
meta: creation-qemu=6.2.0,ctime=1654651445
name: template-[REDACTED]-Windows10Pro
net0: e1000=CA:6B:82:22:7E:1B,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: win10
scsi0: vm-disks:100/base-100-disk-3.qcow2,size=200G
scsi1: vm-disks:100/base-100-disk-4.qcow2,size=1T
scsihw: virtio-scsi-pci
smbios1: uuid=ca60f19b-d364-42e9-9922-cee99de0c310
sockets: 1
template: 1
tpmstate0: vm-disks:100/base-100-disk-1.raw,size=16896,version=v2.0
vmgenid: ac681158-4845-46a9-94b3-fc38acf8c968
 
Hi,
I am experiencing this problem with a template with a virtual TPM. If I detach the TPM the backup succeeds.

I'm running as root@pam.

Code:
INFO: starting new backup job: vzdump 100 --all 0 --notes-template '{{guestname}}' --mailnotification always --prune-backups 'keep-daily=14' --mailto [REDACTED] --storage backups --mode snapshot --node [REDACTED] --compress zstd
INFO: Starting Backup of VM 100 (qemu)
INFO: Backup started at 2022-06-22 12:19:43
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: template-[REDACTED]-Windows10Pro
INFO: include disk 'scsi0' 'vm-disks:100/base-100-disk-3.qcow2' 200G
INFO: include disk 'scsi1' 'vm-disks:100/base-100-disk-4.qcow2' 1T
INFO: include disk 'tpmstate0' 'vm-disks:100/base-100-disk-1.raw' 16896
INFO: creating vzdump archive '/zfs-1/backups/dump/vzdump-qemu-100-2022_06_22-12_19_43.vma.zst'
INFO: starting template backup
INFO: /usr/bin/vma create -v -c /zfs-1/backups/dump/vzdump-qemu-100-2022_06_22-12_19_43.tmp/qemu-server.conf exec:zstd --rsyncable --threads=1 > /zfs-1/backups/dump/vzdump-qemu-100-2022_06_22-12_19_43.vma.dat drive-scsi0=/zfs-1/vm-disks/images/100/base-100-disk-3.qcow2 drive-scsi1=/zfs-1/vm-disks/images/100/base-100-disk-4.qcow2 drive-tpmstate0-backup=/zfs-1/vm-disks/images/100/base-100-disk-1.raw
INFO: progress 0% 0/1314260009472 0
INFO: vma: warning: vma_writer_close failed read error
INFO: image drive-scsi0: size=214748364800 zeros=0 saved=214748364800
INFO: image drive-scsi1: size=1099511627776 zeros=0 saved=1099511627776
INFO: image drive-tpmstate0-backup: size=16896 zeros=0 saved=16896
INFO: vma: creating vma archive failed
ERROR: Backup of VM 100 failed - command '/usr/bin/vma create -v -c /zfs-1/backups/dump/vzdump-qemu-100-2022_06_22-12_19_43.tmp/qemu-server.conf 'exec:zstd --rsyncable --threads=1 > /zfs-1/backups/dump/vzdump-qemu-100-2022_06_22-12_19_43.vma.dat' 'drive-scsi0=/zfs-1/vm-disks/images/100/base-100-disk-3.qcow2' 'drive-scsi1=/zfs-1/vm-disks/images/100/base-100-disk-4.qcow2' 'drive-tpmstate0-backup=/zfs-1/vm-disks/images/100/base-100-disk-1.raw'' failed: got signal 5
INFO: Failed at 2022-06-22 12:19:43
INFO: Backup job finished with errors
TASK ERROR: job errors
this is a different error message and in fact a different issue (affecting non-PBS template backups). The good news is that there is a patch for it (finally got around to send the v2 today), but it still needs to be reviewed/applied/packaged.
 
  • Like
Reactions: fabian

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!