func (vs *VSphere) GetHostFromVMReference(ctx context.Context, vm types.ManagedObjectReference) types.ManagedObjectReference {
	Connect(ctx, vs)
	var vmMo mo.VirtualMachine
	vs.Client.RetrieveOne(ctx, vm, []string{"summary.runtime.host"}, &vmMo)
	host := *vmMo.Summary.Runtime.Host
	return host
}
// GetHostFromVMReference returns host object reference of the host on which the specified VM resides
GetHostFromVMReference returns host object reference of the host on which the specified VM resides
// GetHostFromVMReference returns host object reference of the host on which the specified VM resides
func (vs *VSphere) GetHostFromVMReference(ctx context.Context, vm types.ManagedObjectReference) types.ManagedObjectReference {
	Connect(ctx, vs)
	var vmMo mo.VirtualMachine
	vs.Client.RetrieveOne(ctx, vm, []string{"summary.runtime.host"}, &vmMo)
	host := *vmMo.Summary.Runtime.Host
	return host
}
func ( vs * VSphere ) GetHostFromVMReference ( ctx context . Context , vm types . ManagedObjectReference ) types . ManagedObjectReference { Connect ( ctx , vs ) var vmMo mo . VirtualMachine vs . Client . RetrieveOne ( ctx , vm , [ ] string { " " } , & vmMo ) host := * vmMo . Summary . Runtime . Host return host }
GetHostFromVMReference returns host object reference of the host on which the specified VM resides
GetHostFromVMReference returns host object reference of the host on which the specified VM resides