In order to explore the conductive wall effect of plasma magnetohydrodynamic (MHD) instability and the wall designing idea, the various forms of ideal conductive walls based on divertor equilibrium configurations in the HL-2A tokamak and their role in the suppression of kink modes were studied. The MHD instabilities and the ideal MHD operational <em>β</em> limits under free boundary or ideal wall conditions were compared. In the stability calculation,<em>n</em>=1 kink mode was considered, which had a decisive influence on the MHD instability of tokamak plasmas. The research focuses on verifying the effectiveness of various shapes of conductive walls in suppressing internal and external kink modes, and observing the operational <em>β</em> limit changes, and discussing and analyzing related physics. It is found that an ideal conducting wall placed at a suitable distance from the plasma could effectively suppress the external kink modes. Under the condition that the average distance between the wall and the plasma surface is the same and small enough, the circular cross-section wall is not necessarily the best choice. Setting an optimized polygonal conductive wall can more effectively suppress the MHD instability. It makes the ideal MHD operational <em>β</em> limit of the device, <em>β</em><sub><em>N</em></sub>, increase to 2.73, which is about 6.5% higher than that for the device with a wall assumed to be set at infinity (~2.56). This implies that it is necessary to optimize and make a polygonal conductive wall as close as possible to the average distance from the plasma surface according to the poloidal-section shape of the elongated and shaped plasma, so as to achieve the suppression of external kink mode and increase the operational <em>β</em> limits. The physical mechanism of the stabilizing effect of the ideal wall on external kink modes was analyzed. With the development of the kink mode, when the plasma column is twisted close to the wall, the plasma column will squeeze the magnetic field in the vacuum area, making the magnetic field line compressed and bent. At this time, the magnetic pressure and the component force of the magnetic tension in the opposite direction of the radial direction push the plasma back, thus stabilizing the kink mode. Finally, a conclusion was given.