The dynamics of interacting quantum vortices in a quasi-two-dimensional spatially inhomogeneous Bose-Einstein condensate, whose equilibrium density vanishes at two points of the plane with a possible presence of an immobile vortex with a few circulation quanta at each point, has been considered in a hydrodynamic approximation. A special class of density profiles has been chosen, so that it proves possible to calculate analytically the velocity field produced by point vortices. The equations of motion have been given in a noncanonical Hamiltonian form. The theory has been generalized to the case where the condensate forms a curved quasi-two-dimensional shell in the three-dimensional space.