Hello,
I am occasionally interested in retrieving some values from each VM on my cluster. For example, I would like to check and see if the protection status of each VM is enabled or disabled.
I have been dabbling with pvesh and have learned how to pull the vmid of each VM by using
This is just a current example. I might want to check if a snapshot exists, or if ballooning is enabled, or which VLAN tag is being used. What is the best way to pull all the values of each VM on the cluster so I can parse for what I'm looking for?
Thank you!
I am occasionally interested in retrieving some values from each VM on my cluster. For example, I would like to check and see if the protection status of each VM is enabled or disabled.
I have been dabbling with pvesh and have learned how to pull the vmid of each VM by using
pvesh get /cluster/resources --type vm
but I'm not sure what to do with it after that. To find out the value of protection on each VM, it appears that the only way is to check it with pvesh get /nodes/<nodename>/qemu/config
. Do I have to run a for loop on each of my nodes to get the value or is there a better way?This is just a current example. I might want to check if a snapshot exists, or if ballooning is enabled, or which VLAN tag is being used. What is the best way to pull all the values of each VM on the cluster so I can parse for what I'm looking for?
Thank you!