From 65b5bd801f8a65db5242560f5cbff10424fedc2b Mon Sep 17 00:00:00 2001 From: Adrian Todorov Date: Sun, 26 Nov 2017 10:50:56 +0100 Subject: [PATCH] add check to skip clones in progress --- vsphere-influxdb.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vsphere-influxdb.go b/vsphere-influxdb.go index 2c0f74a..42d7e36 100644 --- a/vsphere-influxdb.go +++ b/vsphere-influxdb.go @@ -378,6 +378,10 @@ func (vcenter *VCenter) Query(config Configuration, InfluxDBClient influxclient. // If we find it, return it, otherwise we return null. for _, vm := range vmmo { + // check if VM is a clone in progress and skip it + if vm.Summary.Runtime.Host == nil { + continue + } vmhost := vm.Summary.Runtime.Host for _, cl := range clmo {