code: public VirtualMachine findByDatastorePath(Datacenter datacenter, String dPath) throws InvalidDatastore, RuntimeFault, RemoteException {
          if (datacenter == null) {
              throw new IllegalArgumentException("datacenter must not be null.");
          }
  
          ManagedObjectReference mor = getVimService().findByDatastorePath(getMOR(), datacenter.getMOR(), dPath);
          return (VirtualMachine) MorUtil.createExactManagedEntity(getServerConnection(), mor);
      }
docs: Find a VM by its location on a datastore
  
  @param datacenter The datacenter within which it searches.
  @param dPath      The datastore path, for example, "[storage1] WinXP/WinXP.vmx".
  @return A VirtualMachine that pointed by the dPath
  @throws RemoteException
  @throws RuntimeFault
  @throws InvalidDatastore