Motivated by recent experiments on the rod-like virus bacteriophage fd, confined to circular and annular domains, we present a theoretical study of structural transitions in these geometries. Using the continuum theory of nematic liquid crystals, we examine the competition between bulk elasticity and surface anchoring, mediated by the formation of topological defects. We show analytically that bulk defects are unstable with respect to defects sitting at the boundary. Moreover, in case of an annulus, whose topology does not require the presence of topological defects, under weak anchoring conditions we find that nematic textures with boundary defects are stable compared to the defect free configurations. Thus our simple approach, with no fitting parameters, suggests a possible symmetry breaking mechanism responsible for the formation of one-, two- and three-fold textures under annular confinement.