distinguish VM from template via api

luphi

Renowned Member
Nov 9, 2015
82
5
73
Hello all,

is there a way to identify by the API, which VMs are templates or not?

Cheers,
Martin
 
in the api call /cluster/resources you can look for 'template' it should be 1 on templates, 0 otherwise
e.g. with pvesh

Code:
pvesh get /cluster/resources -type vm --output-format json | jq '.[] | select(.template == 1)'
 

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!