theapsgroup/vsphere

steampipe plugin install theapsgroup/vspheresteampipe plugin install theapsgroup/vsphere

Table: vsphere_vm

A VM is a virtual machine.

The vsphere_vm table can be used to query virtual machines.

Examples

List virtual machines

select
*
from
vsphere_vm;

Select all vms with more than 6 cores assigned

select
*
from
vsphere_vm
where
num_cpu > 6;

Select all vms with a name containing test and and uptime of more than 1 hour

select
*
from
vsphere_vm
where
name ILIKE '%test%' and uptime > 3600;

.inspect vsphere_vm

VM's running in vsphere

NameTypeDescription
cpu_usagebigintVM cpu usage in mhz
guest_memory_usagebigintCurrent memory usage in mb
host_memory_usagebigintConsumed memory on the host by this vm
idtextThe guest operating system identifier (short name)
ip_addresstextPrimary IP address assigned to the guest operating system, if known
memorybigintMemory size of the virtual machine in MB
nametextThe name of the virtual machine
num_cpubigintNumber of virutal processors in the virtual machine
statustextThe overall guest status
uptimebigintThe guest uptime in seconds