Export List of VM's, with their Storage Location

Hello, this command works great from CLI, as do many others. But what I am trying to do is get a export that actually shows where the boot disk is. Example on mount NFS or local storage. I have omitted some details here. But it would be amazing if I could export a list. And next to the VM it would say,

1654118397072.png

1654118360604.png
 
You are going to have to write something that fits your environment to produce the result that you want. The challenges are:
- any disk can be boot disk not just disk-0
- there could be multiple boot disks
- the only way for PVE API to determine boot disk is from available configuration. While there is a "boot:" option (man qm) - its not required.
- boot: can be a list several devices (man qm), not all of the devices could be present.

json output and jq processing can be very powerful to create almost any output you want given the data available.
Good luck.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
In case you were not aware you could just get a list of all volumes on specific storage, which might help with correlation:
Code:
pvesm list blockbridge
Volid                          Format  Type            Size VMID
blockbridge:vm-100-cloudinit   raw     images       4194304 100
blockbridge:vm-100-disk-0      raw     images     117440512 100
blockbridge:vm-100-disk-1      raw     images     117440512 100
blockbridge:vm-100-state-snap1 raw     images    1598029824 100
blockbridge:vm-2000-cloudinit  raw     images       4194304 2000
blockbridge:vm-2000-disk-0     raw     images     117440512 2000



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: herzkerl

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!