retrieve all VM properties
This commit is contained in:
@@ -202,9 +202,11 @@ func (v *Vcenter) FindVMByIDWithDatacenter(vmID string, dcID string) (*VmPropert
|
|||||||
}
|
}
|
||||||
|
|
||||||
var vm mo.VirtualMachine
|
var vm mo.VirtualMachine
|
||||||
err := v.client.RetrieveOne(v.ctx, vmRef, []string{"config", "name"}, &vm)
|
//err := v.client.RetrieveOne(v.ctx, vmRef, []string{"config", "name"}, &vm)
|
||||||
|
err := v.client.RetrieveOne(v.ctx, vmRef, nil, &vm)
|
||||||
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
v.Logger.Debug("Found VM", "vm", vm)
|
||||||
return &VmProperties{
|
return &VmProperties{
|
||||||
Datacenter: datacenter.Name(),
|
Datacenter: datacenter.Name(),
|
||||||
Vm: vm,
|
Vm: vm,
|
||||||
|
Reference in New Issue
Block a user