A Lorentzian-to-Gaussian lineshape transition is investigated in an InP-based silver-coated nanolaser with verified lasing operation. The effect stems from cavity eigenmodes extending into free space and serves as a convenient lasing indicator for high-β nanolasers.