How to list running VMs (and their options) from script?

achekalin

Member
Jun 17, 2011
74
0
6
Hello,

I try to make some monitoring system to check which VM are running/non running on given server. It is easy to check from web interface, but I can't check it from bash scripts. So, may I ask you for advice - how can I check which VMs are running now from script or shell?

Another thing (if it's possible at all) I'd love to know is to know each VM settings ('Run on startup' checkbox, memory settings) without dump config files parsing?

Thank you in advance for your help!
 
how can I check which VMs are running now from script or shell?

use 'vzlist' and 'qm list'

Another thing (if it's possible at all) I'd love to know is to know each VM settings ('Run on startup' checkbox, memory settings) without dump config files parsing?

The config file is the only place where that info is stored.