I have a VM which runs a backup script at night. During the prodecure, I request a hdd from my Proxmox server using
When the script is interactively called, everything works as expected. When being called from Cron, it usually works, but sometimes fails. In this case, the script outputs the client's
I assume that something just takes some time. Is there any suggestion to do besides
ssh $server qm set $vmid -scsi1 /dev/$hdd,backup=0
, followed by sleep 1
.When the script is interactively called, everything works as expected. When being called from Cron, it usually works, but sometimes fails. In this case, the script outputs the client's
/dev/disk/by-id
(where my script expects to find the provided hdd) and indeed, there is not the scsi-0QEMU_QEMU_HARDDISK_drive-scsi1
, even if the line above states update VM 211: -scsi1 /dev/sdd1,backup=0
, so the command itself succeeded.I assume that something just takes some time. Is there any suggestion to do besides
sync && sleep 1
instead of just sleeping?
Last edited: