19 lines
407 B
Bash
Executable File
19 lines
407 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Proxmox VE virtual machine listing
|
|
# (c) 2015-2019, Tom Laermans for Observium
|
|
|
|
PVESH=`which pvesh`
|
|
if [ $? -eq 0 ]
|
|
then
|
|
echo "<<<proxmox-qemu>>>"
|
|
|
|
VERSION=$(pveversion | awk -F/ '{print $2}' | sed 's/\..*//')
|
|
if [[ ${VERSION} -ge 5 ]]
|
|
then
|
|
pvesh get /nodes/$(hostname)/qemu --output-format=json-pretty 2>/dev/null
|
|
else
|
|
pvesh get /nodes/$(hostname)/qemu 2>/dev/null
|
|
fi
|
|
fi
|