In this paper, the performance of variable-gain (VG) amplify-and-forward (AF) relaying is studied considering both the practical problems of hardware impairments (HWI) and imperfect channel estimation (ICE). End-to-end signal-to-noise plus distortion-and-error ratio (SNDER) and outage probability (OP) expressions for this model are found over Nakagami-m fading channels. Upper bound of the system performance with respect to the SNDER is also found out in the presence of HWI and ICE. High SNR analysis of the derived expressions is performed to gain deeper insights into the performance. The results of fixed-gain (FG) AF and VG-AF are compared with the lower bound of the OP. To verify the theoretical results, Monte Carlo simulation is used. Further, there are plots which show the system behavior with improving channel conditions.