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.
 

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!