backing up VM template does not work

modem7

Member
Nov 2, 2021
35
2
13
38
Hey guys,

When I try to backup VM templates, they're currently not working.

Logs:
Code:
INFO: starting new backup job: vzdump 6000 --mode snapshot --storage backup --node proxmox --notes-template '{{guestname}}' --remove 0 --compress zstd
INFO: Starting Backup of VM 6000 (qemu)
INFO: Backup started at 2022-05-11 14:08:23
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 5
INFO: VM Name: ubuntu2004-cloud-master
INFO: include disk 'scsi0' 'Proxmox:6000/base-6000-disk-1.qcow2' 15G
INFO: include disk 'efidisk0' 'Proxmox:6000/base-6000-disk-0.qcow2' 528K
INFO: creating vzdump archive '/mnt/backup/dump/vzdump-qemu-6000-2022_05_11-14_08_23.vma.zst'
INFO: starting template backup
INFO: /usr/bin/vma create -v -c /mnt/backup/dump/vzdump-qemu-6000-2022_05_11-14_08_23.tmp/qemu-server.conf exec:zstd --rsyncable --threads=4 > /mnt/backup/dump/vzdump-qemu-6000-2022_05_11-14_08_23.vma.dat drive-efidisk0=/mnt/prox/images/6000/base-6000-disk-0.qcow2 drive-scsi0=/mnt/prox/images/6000/base-6000-disk-1.qcow2
INFO: progress 0% 0/16106668032 0
INFO: vma: warning: vma_writer_close failed read error
INFO: image drive-efidisk0: size=540672 zeros=0 saved=540672
INFO: image drive-scsi0: size=16106127360 zeros=5988352 saved=16100139008
INFO: vma: creating vma archive failed
ERROR: Backup of VM 6000 failed - command '/usr/bin/vma create -v -c /mnt/backup/dump/vzdump-qemu-6000-2022_05_11-14_08_23.tmp/qemu-server.conf 'exec:zstd --rsyncable --threads=4 > /mnt/backup/dump/vzdump-qemu-6000-2022_05_11-14_08_23.vma.dat' 'drive-efidisk0=/mnt/prox/images/6000/base-6000-disk-0.qcow2' 'drive-scsi0=/mnt/prox/images/6000/base-6000-disk-1.qcow2'' failed: got signal 5
INFO: Failed at 2022-05-11 14:08:23
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-3 (running version: 7.2-3/c743d6c1)
pve-kernel-5.15: 7.2-3
pve-kernel-helper: 7.2-3
pve-kernel-5.15.35-1-pve: 5.15.35-2
ceph-fuse: 15.2.13-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.2
libproxmox-backup-qemu0: 1.2.0-1
libpve-access-control: 7.1-8
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.1-6
libpve-guest-common-perl: 4.1-2
libpve-http-server-perl: 4.1-1
libpve-storage-perl: 7.2-2
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.1.8-1
proxmox-backup-file-restore: 2.1.8-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.4-10
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-1
pve-qemu-kvm: 6.2.0-5
pve-xtermjs: 4.16.0-1
qemu-server: 7.2-2
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.7.1~bpo11+1
vncterm: 1.7-1
zfsutils-linux: 2.1.4-pve1

From what I can see, it's never worked for these particular templates - but they're pretty new.

However, the VM's they're cloned from are backing up with no issues.

1652274906369.png

Any help would be great, cheers!
 
Could you track down what the problem was? I tried to recreate your template configuration as closely as possible over here but I cannot reproduce the problem.

Not going off much here, but I would guess that it has something to do with the drive mounted at /mnt/backup/dump/.

INFO: progress 0% 0/16106668032 0 INFO: vma: warning: vma_writer_close failed read error
This seems to somewhat reinforce my speculation.

What drive did you mount for your backups and what are you using with it (e.g. ZFS, simple ext4, ...)?
 
Could you track down what the problem was? I tried to recreate your template configuration as closely as possible over here but I cannot reproduce the problem.

Not going off much here, but I would guess that it has something to do with the drive mounted at /mnt/backup/dump/.


This seems to somewhat reinforce my speculation.

What drive did you mount for your backups and what are you using with it (e.g. ZFS, simple ext4, ...)?

Heya,

Unfortunately no solution as of yet. My workaround is to keep a non-template version of the VM's for backup (and editing) purposes, and excluding the templates from the backups.

So I use this script to create my templates:

https://github.com/modem7/public_scripts/blob/master/Bash/Proxmox Scripts/create-cloud-template.sh

This is the drive I'm using for backups. It works with all non-VM Templates

1652456042561.png
1652456406680.png
Code:
cat /etc/pve/storage.cfg
dir: local
        disable
        path /var/lib/vz
        content vztmpl,rootdir
        shared 0

lvmthin: local-lvm
        thinpool data
        vgname pve
        content rootdir,images

dir: backup
        path /mnt/backup
        content backup
        prune-backups keep-all=1
        shared 0

dir: Proxmox
        path /mnt/prox
        content vztmpl,iso,images,rootdir,snippets
        prune-backups keep-all=1
        shared 0


This is my current backup setting for the template:
1652456132123.png


This is what happens when I backup a normal VM:

Code:
INFO: starting new backup job: vzdump 6002 --compress zstd --node proxmox --storage backup --mode snapshot --notes-template '{{guestname}}' --remove 0
INFO: Starting Backup of VM 6002 (qemu)
INFO: Backup started at 2022-05-13 16:48:17
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 5
INFO: VM Name: ubuntu2004-cloud-master
INFO: include disk 'scsi0' 'Proxmox:6002/vm-6002-disk-0.qcow2' 15G
INFO: include disk 'efidisk0' 'Proxmox:6002/vm-6002-disk-1.qcow2' 528K
INFO: creating vzdump archive '/mnt/backup/dump/vzdump-qemu-6002-2022_05_13-16_48_17.vma.zst'
INFO: starting kvm to execute backup task
generating cloud-init ISO
INFO: started backup task '8010987b-328d-4546-bb04-1715aaec4fc0'
INFO:   4% (761.2 MiB of 15.0 GiB) in 3s, read: 253.8 MiB/s, write: 191.9 MiB/s
INFO:  10% (1.6 GiB of 15.0 GiB) in 6s, read: 276.7 MiB/s, write: 196.5 MiB/s
INFO:  27% (4.1 GiB of 15.0 GiB) in 10s, read: 648.9 MiB/s, write: 116.5 MiB/s
INFO:  31% (4.7 GiB of 15.0 GiB) in 13s, read: 224.8 MiB/s, write: 178.7 MiB/s
INFO:  80% (12.1 GiB of 15.0 GiB) in 18s, read: 1.5 GiB/s, write: 40.9 MiB/s
INFO: 100% (15.0 GiB of 15.0 GiB) in 20s, read: 1.4 GiB/s, write: 250.0 KiB/s
INFO: backup is sparse: 12.68 GiB (84%) total zero data
INFO: transferred 15.00 GiB in 20 seconds (768.0 MiB/s)
INFO: stopping kvm after backup task
INFO: archive file size: 728MB
INFO: adding notes to backup
INFO: Finished Backup of VM 6002 (00:00:22)
INFO: Backup finished at 2022-05-13 16:48:39
INFO: Backup job finished successfully
TASK OK
 
Running into this exact issue. Can't get my templates to properly backup.

Code:
INFO: Starting Backup of VM 900 (qemu)
INFO: Backup started at 2024-05-11 03:24:07
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: ubuntu-24.04-template
INFO: include disk 'scsi0' 'local-zfs:base-900-disk-0' 32G
INFO: creating vzdump archive '/mnt/gcp/dump/vzdump-qemu-900-2024_05_11-03_24_07.vma.zst'
INFO: starting template backup
INFO: /usr/bin/vma create -v -c /mnt/gcp/dump/vzdump-qemu-900-2024_05_11-03_24_07.tmp/qemu-server.conf exec:zstd --threads=1 > /mnt/gcp/dump/vzdump-qemu-900-2024_05_11-03_24_07.vma.dat drive-scsi0=/dev/zvol/rpool/data/base-900-disk-0
INFO: vma: Unable to read file: Failed to open file â/mnt/gcp/dump/vzdump-qemu-900-2024_05_11-03_24_07.tmp/qemu-server.confâ: Interrupted system call
ERROR: Backup of VM 900 failed - command '/usr/bin/vma create -v -c /mnt/gcp/dump/vzdump-qemu-900-2024_05_11-03_24_07.tmp/qemu-server.conf 'exec:zstd --threads=1 > /mnt/gcp/dump/vzdump-qemu-900-2024_05_11-03_24_07.vma.dat' 'drive-scsi0=/dev/zvol/rpool/data/base-900-disk-0'' failed: got signal 5
INFO: Failed at 2024-05-11 03:24:08
 
Hi,
Running into this exact issue. Can't get my templates to properly backup.

Code:
INFO: Starting Backup of VM 900 (qemu)
INFO: Backup started at 2024-05-11 03:24:07
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: ubuntu-24.04-template
INFO: include disk 'scsi0' 'local-zfs:base-900-disk-0' 32G
INFO: creating vzdump archive '/mnt/gcp/dump/vzdump-qemu-900-2024_05_11-03_24_07.vma.zst'
INFO: starting template backup
INFO: /usr/bin/vma create -v -c /mnt/gcp/dump/vzdump-qemu-900-2024_05_11-03_24_07.tmp/qemu-server.conf exec:zstd --threads=1 > /mnt/gcp/dump/vzdump-qemu-900-2024_05_11-03_24_07.vma.dat drive-scsi0=/dev/zvol/rpool/data/base-900-disk-0
INFO: vma: Unable to read file: Failed to open file â/mnt/gcp/dump/vzdump-qemu-900-2024_05_11-03_24_07.tmp/qemu-server.confâ: Interrupted system call
ERROR: Backup of VM 900 failed - command '/usr/bin/vma create -v -c /mnt/gcp/dump/vzdump-qemu-900-2024_05_11-03_24_07.tmp/qemu-server.conf 'exec:zstd --threads=1 > /mnt/gcp/dump/vzdump-qemu-900-2024_05_11-03_24_07.vma.dat' 'drive-scsi0=/dev/zvol/rpool/data/base-900-disk-0'' failed: got signal 5
INFO: Failed at 2024-05-11 03:24:08
please share the output of pveversion -v and qm config 900 as well as the beginning of the backup task log, i.e. the line with the parameters:
Code:
INFO: starting new backup job: vzdump [...]
 

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!