Skip to content

Commit

Permalink
fix crash on VM cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
sofixa committed Dec 10, 2017
1 parent 3fe6b1f commit 942b49d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vsphere-influxdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,9 @@ func (vcenter *VCenter) Query(config Configuration, InfluxDBClient influxclient.
if vmToPool[vm.Self] != "" {
vmSummary[vm.Self]["respool"] = vmToPool[vm.Self]
}
vmSummary[vm.Self]["esx"] = hostSummary[*vm.Summary.Runtime.Host]["name"]
if vm.Summary.Runtime.Host != nil {
vmSummary[vm.Self]["esx"] = hostSummary[*vm.Summary.Runtime.Host]["name"]
}
}

// get object names
Expand Down

0 comments on commit 942b49d

Please sign in to comment.