Providing hdd to VM client slow or delayed?

rty

New Member
Feb 3, 2023
9
0
1
I have a VM which runs a backup script at night. During the prodecure, I request a hdd from my Proxmox server using
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:

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!