We classify constant mean curvature surfaces invariant by a 1-parameter group of isometries in the Berger spheres and in the special linear group SI(2, R). In particular, all constant mean curvature spheres in those spaces are described explicitly, proving that they are not always embedded. Besides new examples of Delaunay-type surfaces are obtained. Finally the relation between the area and volume of these spheres in the Berger spheres is studied, showing that, in some cases, they are not solution to the isoperimetric problem. (C) 2010 Elsevier B.V. All rights reserved.