code: def get_vm_obj(self):
          
          uuid = VcenterInterfaces.get_vcenter_vm_uuid_by_name(self.host, self.user, self.password, self.name)
          # connect to vc
  
          # Getting VM data
          vm_obj = self.vcenter_conn.content.searchIndex.FindByUuid(None, uuid, True, True)
          # VM does exist
          if not vm_obj:
              print 'VM {} does not exist'.format(uuid)
              sys.exit(1)
  
          # VM must be powered off to export
          if not vm_obj.runtime.powerState == \
                  vim.VirtualMachine.PowerState.poweredOff:
              print 'VM {} must be powered off'.format(vm_obj.name)
              sys.exit(1)
  
          return vm_obj
docs: Search for vm in vcenter, return the object if found
          :return: