To reduce active relays in peer-to-peer relay networks, a sparsity promoting penalty term is introduced into the objective function to obtain beamforming weights through minimization of the total relay transmit power while the signal-to-interference-plus-noise ratio (SINR) at the destinations are guaranteed to be above certain thresholds. To deal with the non-convexity of the problem, we use semidefinite relaxation to turn this problem into a semidefinite programming (SDP) problem. Then we can efficiently solve the SDP problem using interior point method based software tools. Simulation results show that the proposed method can efficiently conduct relay selection with a mild increase in minimum total transmit power of the relays compared with the traditional full cooperative relay network.