add check to skip clones in progress

This commit is contained in:
Adrian Todorov 2017-11-26 10:50:56 +01:00
parent 9508bf0dae
commit 65b5bd801f
1 changed files with 4 additions and 0 deletions

View File

@ -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 {