fix crash on VM cloning

This commit is contained in:
Adrian Todorov 2017-12-10 17:22:33 +01:00
parent 3fe6b1fc22
commit 942b49d61e
1 changed files with 3 additions and 1 deletions

View File

@ -449,7 +449,9 @@ func (vcenter *VCenter) Query(config Configuration, InfluxDBClient influxclient.
if vmToPool[vm.Self] != "" { if vmToPool[vm.Self] != "" {
vmSummary[vm.Self]["respool"] = 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 // get object names