SSD TWB Limit for VMs

sasha181

Member
Apr 5, 2019
3
0
21
44
Hello.
Several times I encountered a problem when something wrote a lot to the disk inside the virtual machine. When a server is used to provide hosting services, this becomes a serious problem, as A VPS server, even at a cheap tariff, can record an unlimited amount of data.
Is there any way to control this somehow? For example, using limit the amount of data recorded a VM to the storage per day, month. Or at least keep statistics how much data the virtual machine recorded per hour. And based on these statistics, for example, lower the write speed limit to a very small value на следующий час?
I think this question can not only interest me.
I would be very grateful for any ideas in this direction.
 
the api/cli allows for this

Code:
qm status ID --verbose
pvesh get /nodes/NODENAME/qemu/ID/status/current --output-format json-pretty
gives blockstats for each drive (since the last start of the vm)