def get_host_ref_for_vm(session, instance):
 vm_ref = get_vm_ref(session, instance)
 return session._call_method(vutil, 'get_object_property', vm_ref, 'runtime.host')

def get_host_ref_for_vm ( session , instance ) : vm_ref = get_vm_ref ( session , instance ) return session . _call_method ( vutil , 'get_object_property' , vm_ref , 'runtime.host' )
get a moref to the esxi host currently running an instance .