Trouble running pvesm in cron

voltaiac

New Member
Oct 22, 2025
14
2
3
Hi all,

I'm not sure pvesm is running when done so by cron. I've checked a few things and i've come to the conclusion that on my system in cron;

* * * * * pvesm apiinfo does nothing
* * * * * pvesm apiinfo > /tmp/pvesmtest makes a file, but has no contents.
* * * * * /root/backup.sh (which contains: pvesm apiinfo &> /tmp/pvesmtest) also makes a file, but has no contents.

Likewise, the actual command I want to use, pvesm set Backup --disable 0 doesn't function. I don't think it will be useful but here's the system journal:
Mar 08 17:48:01 pve1 CRON[2390142]: pam_unix(cron:session): session opened for user root(uid=0) by root(uid=0)
Mar 08 17:48:01 pve1 CRON[2390144]: (root) CMD (/root/backup.sh)
Mar 08 17:48:01 pve1 postfix/pickup[2327055]: 5BB2412232: uid=0 from=<root>
Mar 08 17:48:01 pve1 postfix/cleanup[2380096]: 5BB2412232: message-id=<20260308164801.5BB2412232@pve1.internal>
Mar 08 17:48:01 pve1 CRON[2390142]: pam_unix(cron:session): session closed for user root
Mar 08 17:48:01 pve1 postfix/qmgr[1826]: 5BB2412232: from=<root@pve1.internal>, size=577, nrcpt=1 (queue active)
Mar 08 17:48:01 pve1 postfix/pickup[2327055]: 5F28012233: uid=65534 from=<root>
Mar 08 17:48:01 pve1 postfix/cleanup[2380096]: 5F28012233: message-id=<20260308164801.5BB2412232@pve1.internal>
Mar 08 17:48:01 pve1 proxmox-mail-forward[2390148]: notified via target `mail-to-root`
Mar 08 17:48:01 pve1 postfix/local[2380109]: 5BB2412232: to=<root@pve1.internal>, orig_to=<root>, relay=local, delay=0.02, delays=0/0/0/0.01, dsn=2.0.0, status=sent (delivered to command: /usr/libexec/proxmox-mail-forward)
Mar 08 17:48:01 pve1 postfix/qmgr[1826]: 5BB2412232: removed
Mar 08 17:48:01 pve1 postfix/qmgr[1826]: 5F28012233: from=<root@pve1.internal>, size=744, nrcpt=1 (queue active)
Mar 08 17:48:01 pve1 postfix/smtp[2380114]: 5F28012233: to=<redacted>, relay=eur.olc.protection.outlook.com[52.101.68.24]:25, delay=0.57, delays=0/0/0.09/0.47, dsn=2.6.0, status=sent (250 2.6.0 <20260308164801.5BB2412232@pve1.internal> [InternalId=18957985652780, Hostname=VI0PR01MB12078.eurprd01.prod.exchangelabs.com] 8601 bytes in 0.135, 61.819 KB/sec Queued mail for delivery -> 250 2.1.5)
Mar 08 17:48:01 pve1 postfix/qmgr[1826]: 5F28012233: removed

If I run any of these commands manually it works without issue. i've not found another command that also doesn't work in cron, so i'm a little stumped at this.

Running the following, I appreciate any help.

root@pve1:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
DEBIAN_VERSION_FULL=13.3
root@pve1:~# uname -r
6.17.13-1-pve
root@pve1:~# apt list libpve-storage-perl
libpve-storage-perl/stable,now 9.1.0 all [installed]