How to export all hard disk sizes and usage rates of all virtual machines in the cluster

pve51888

New Member
Oct 2, 2023
21
0
1
proxmox7.3.3
today i use "pvesh get /cluster/resources" to get vm information .
i can say many information about cpu ,memory,and max disk .
but ,
1.If each virtual machine has multiple hard disks, pvesh get will only display the maximum value of the first hard disk
2. Lack of hard disk usage information for each virtual machines
(For example, the hard drive of XX virtual machine uses 10%)
Kneel down and ask the boss to help me solve this problem~~
1703552086026.png
 
Last edited:
Hi,
you can use pvesh get /nodes/<your node name>/storage/<your storage ID>/content for each of your storages. Most thin provisioned storages should give you back a value for the actual usage, i.e. the used column too.

In general, if you want to do calculations with the result of pvesh, you can use --output-format json and a tool like jq to extract the values you want.
 

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!