"qm destroy <vmid> --purge" removes values from existing backup jobs.

proxuser77

New Member
Aug 12, 2023
3
0
1
Hello everyone

I have kind of a wierd issue for which I'm not able to find a solution. So I'm hopping someone here might be able to provide some ideas that help to point me in the right direction... I'm running Proxmox VE 8.0.4 in a three node cluster (no HA), with mixed nodes (different storage and CPU types).

When I purge a VM on one of the hosts in the cluster, by using the command qm destroy <vmid> --purge, among other things, the selection of VMs to be backed will get removed from all existing backup jobs, which is kind of unfortunate, for obvious reasons ;-)

The following values are getting removed from the backup jobs after executing qm destroy <vmid> --purge:
- Node
- Send Email to
- Email
- The selection of the VMs to be backed up.

The following values do persist:
- Storage
- Schedule
- Selection Mode (Include Selected VMs)
- Compression (ZSTD)
- Mode (Snapshot)
- Also the check mark at "Enable" remains set.

That's what the jobs look like after purging a VM:

Bildschirmfoto vom 2023-08-12 14-04-02.png

Otherwise the command seems to work as expected, meaning the respective VM and the associated disks are actually getting purged.

Oh, and none of the VMs i purged were included in any of the backup jobs.
 
Last edited:
Hi,
the purge flag is specifically for removing the VM ID from job configurations, but the other fields in the job shouldn't be touched.
From man qm
Code:
--purge <boolean>
           Remove VMID from configurations, like backup & replication jobs and HA.

Please share the output of pveversion -v of the problematic node. Is it the same version as the other nodes? Is it upgraded?
 
Hi, and thanks for getting back to me.

the purge flag is specifically for removing the VM ID from job configurations, but the other fields in the job shouldn't be touched.
Is the --purge option only useful if the VM was included in a backup job, and/or when HA is used?

If that would be the case, I can simply omit the option. I mainly use the command in a bash script, in order to quickly start a few test VMs, respectively to remove them after my tests are finished, so they are never included in any backup jobs anyways...

Btw. This only happens on the command line. When I select "Purge from job configurations" in the UI the backup configurations stay intact.

Also, sometimes (not always), I'm geting the the following messages when running the command:

Code:
  Logical volume "vm-220222-cloudinit" successfully removed.
  Logical volume "vm-220222-disk-0" successfully removed.
purging VM 220222 from related configurations..
file /etc/pve/jobs.cfg line 4 (section 'backup-93ceeedf-ea1a') - unable to parse value of 'mailnotification': unknown property type
file /etc/pve/jobs.cfg line 5 (section 'backup-93ceeedf-ea1a') - unable to parse value of 'mailto': unknown property type
file /etc/pve/jobs.cfg line 6 (section 'backup-93ceeedf-ea1a') - unable to parse value of 'mode': unknown property type
file /etc/pve/jobs.cfg line 7 (section 'backup-93ceeedf-ea1a') - unable to parse value of 'node': unknown property type
file /etc/pve/jobs.cfg line 8 (section 'backup-93ceeedf-ea1a') - unable to parse value of 'storage': unknown property type
file /etc/pve/jobs.cfg line 9 (section 'backup-93ceeedf-ea1a') - unable to parse value of 'vmid': unknown property type
file /etc/pve/jobs.cfg line 13 (section 'backup-26dd72fc-2809') - unable to parse value of 'compress': unknown property type
file /etc/pve/jobs.cfg line 15 (section 'backup-26dd72fc-2809') - unable to parse value of 'mailnotification': unknown property type
file /etc/pve/jobs.cfg line 16 (section 'backup-26dd72fc-2809') - unable to parse value of 'mailto': unknown property type
file /etc/pve/jobs.cfg line 17 (section 'backup-26dd72fc-2809') - unable to parse value of 'mode': unknown property type
file /etc/pve/jobs.cfg line 18 (section 'backup-26dd72fc-2809') - unable to parse value of 'node': unknown property type
file /etc/pve/jobs.cfg line 19 (section 'backup-26dd72fc-2809') - unable to parse value of 'storage': unknown property type
file /etc/pve/jobs.cfg line 20 (section 'backup-26dd72fc-2809') - unable to parse value of 'vmid': unknown property type
file /etc/pve/jobs.cfg line 24 (section 'backup-df02b683-95dd') - unable to parse value of 'compress': unknown property type
file /etc/pve/jobs.cfg line 26 (section 'backup-df02b683-95dd') - unable to parse value of 'mailnotification': unknown property type
file /etc/pve/jobs.cfg line 27 (section 'backup-df02b683-95dd') - unable to parse value of 'mailto': unknown property type
file /etc/pve/jobs.cfg line 28 (section 'backup-df02b683-95dd') - unable to parse value of 'mode': unknown property type
file /etc/pve/jobs.cfg line 29 (section 'backup-df02b683-95dd') - unable to parse value of 'node': unknown property type
file /etc/pve/jobs.cfg line 30 (section 'backup-df02b683-95dd') - unable to parse value of 'storage': unknown property type
file /etc/pve/jobs.cfg line 31 (section 'backup-df02b683-95dd') - unable to parse value of 'vmid': unknown property type

Is it the same version as the other nodes? Is it upgraded?
Yes and yes.

Code:
proxmox-ve: 8.0.2 (running kernel: 6.2.16-6-pve)
pve-manager: 8.0.4 (running version: 8.0.4/d258a813cfa6b390)
pve-kernel-6.2: 8.0.5
proxmox-kernel-helper: 8.0.3
proxmox-kernel-6.2.16-6-pve: 6.2.16-7
proxmox-kernel-6.2: 6.2.16-7
pve-kernel-6.2.16-3-pve: 6.2.16-3
ceph-fuse: 17.2.6-pve1+3
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-3
libknet1: 1.25-pve1
libproxmox-acme-perl: 1.4.6
libproxmox-backup-qemu0: 1.4.0
libproxmox-rs-perl: 0.3.1
libpve-access-control: 8.0.4
libpve-apiclient-perl: 3.3.1
libpve-common-perl: 8.0.7
libpve-guest-common-perl: 5.0.4
libpve-http-server-perl: 5.0.4
libpve-rs-perl: 0.8.5
libpve-storage-perl: 8.0.2
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 5.0.2-4
lxcfs: 5.0.3-pve3
novnc-pve: 1.4.0-2
proxmox-backup-client: 3.0.2-1
proxmox-backup-file-restore: 3.0.2-1
proxmox-kernel-helper: 8.0.3
proxmox-mail-forward: 0.2.0
proxmox-mini-journalreader: 1.4.0
proxmox-widget-toolkit: 4.0.6
pve-cluster: 8.0.3
pve-container: 5.0.4
pve-docs: 8.0.4
pve-edk2-firmware: 3.20230228-4
pve-firewall: 5.0.3
pve-firmware: 3.7-1
pve-ha-manager: 4.0.2
pve-i18n: 3.0.5
pve-qemu-kvm: 8.0.2-4
pve-xtermjs: 4.16.0-3
qemu-server: 8.0.6
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.1.12-pve1
 
Last edited:
Is the --purge option only useful if the VM was included in a backup job, and/or when HA is used?

If that would be the case, I can simply omit the option. I mainly use the command in a bash script, in order to quickly start a few test VMs, respectively to remove them after my tests are finished, so they are never included in any backup jobs anyways...
No, you don't need that option then. And until the bug is fixed, I'd recommend not using it when using qm.

Btw. This only happens on the command line. When I select "Purge from job configurations" in the UI the backup configurations stay intact.
I was able to reproduce the issue and we'll try to work out a fix. The suspicion why it only affects the CLI tool is because of different Perl includes.

Thank you for the report!
 

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!