def _get_vm_ref_from_name(session, vm_name):
 vms = session._call_method(vim_util, 'get_objects', 'VirtualMachine', ['name'])
 return _get_object_from_results(session, vms, vm_name, _get_object_for_value)

def _get_vm_ref_from_name ( session , vm_name ) : vms = session . _call_method ( vim_util , 'get_objects' , 'VirtualMachine' , [ 'name' ] ) return _get_object_from_results ( session , vms , vm_name , _get_object_for_value )
get reference to the vm with the name specified .