def get_host_name_for_vm(session, instance):
 host_ref = get_host_ref_for_vm(session, instance)
 return session._call_method(vutil, 'get_object_property', host_ref, 'name')

def get_host_name_for_vm ( session , instance ) : host_ref = get_host_ref_for_vm ( session , instance ) return session . _call_method ( vutil , 'get_object_property' , host_ref , 'name' )
get the hostname of the esxi host currently running an instance .