Know list of VMs with its disk sizes?

alexc

Renowned Member
Apr 13, 2015
139
4
83
Dealing with several PVE hosts, all of them are standalone, I want to know disk of each VM in some algorithically easy way. The problem that, some of VMs are raw or qcow2 files, some are stored in zfs volumes.

I suspect I can only scan /etc/pve/qemu-server/*.conf files for virtio/scsi/ide/sata lines and scan them for "size=...G" parts, but may there be any other way, like asking PVE to tell given VM disk sizes?
 
hi,

just run qm list :)
if you want all the disks for a given VM (and not only bootdisk), then you can do something like qm config VMID | grep size
 
Last edited: