[SOLVED] Dynamically set Disk (virtio0) limits using CLI (pvesh/qm)

godzilla

Member
May 20, 2021
76
5
13
42
Hi,

whenever I set disk limits using pvesh or qm command line tools, the setting is not applied immediately. Instead, the new setting turns orange in the web UI meaning that it will be applied at the next reboot.
If I set the parameters directly in the web UI, they are immediately applied with no reboot needed.
I know they use the very same PVE API, so I really can't understand why this happens. Can you help me?

I'm using this command as an example:
Code:
# pvesh set /nodes/proxnode08/qemu/130/config --virtio0 file=ceph_storage:vm-130-disk-0,iops_wr=256,iops_wr_max=512,mbps_rd=50,mbps_wr=50
update VM 130: -virtio0 file=ceph_storage:vm-130-disk-0,iops_wr=256,iops_wr_max=512,mbps_rd=50,mbps_wr=50

The command itself is successful, but the new settings are not applied in real time. I even replaced set with create out of despair, but the final result is the same.

Edit: running PVE 7.2

Any clue?
Thank you!
 
Last edited:
Works for me.
What happens when you wait a few seconds for the UI to update, does yellow font then disappear?
 
Hi Matthias,

thanks for your reply. I understood where I was wrong. I needed to set all the other current parameters to be the same.

For example, I had these params on the UI. As you can see, 'cache' is explicitly set to 'none' in my config:
ceph_storage:vm-130-disk-0,cache=none,format=raw,iops_wr=256,iops_wr_max=512,mbps_rd=60,mbps_wr=60,size=40G

and cache was not included in my command line.

So I simply added ,cache=none to the command line and it worked seamlessly.
Code:
# pvesh set /nodes/proxnode08/qemu/130/config --virtio0 file=ceph_storage:vm-130-disk-0,iops_wr=256,iops_wr_max=512,mbps_rd=50,mbps_wr=50,cache=none

Thank you again, I'm going to mark this as solved.
 
  • Like
Reactions: Matthias.

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!