The influence of distributed generation sources in the Islanded microgrid has adverse effects on frequency stability because of the absence of inertia. Accordingly, the concept of a virtual synchronous generator (VSG) has been proposed, which follows the behavior of conventional synchronous generators. The virtual inertia control can be implemented on energy storage systems (ESSs) as a part of a virtual synchronous generator. Virtual inertial control does not perform optimally against the uncertainty of islanded microgrid parameters and disturbances. Therefore, virtual inertial control requires a supplementary controller in its structure that is resistant to these effects. In this paper, a new robust output feedback control method was used to control the virtual inertia in a two-area microgrid, which is based on the linear matrix inequality. The proposed control method does not need to measure all modes and only uses the output feedback. We compared the results of the proposed controller for controlling the virtual inertia in multiple different scenarios by considering the uncertainty of the two-area microgrid parameters as well as disturbances applied to the microgrid with the virtual inertia control based on optimized PI controllers (genetic algorithm), no controller (virtual inertia), and without considering virtual inertia (conventional methods). Accordingly, the effectiveness of the proposed method was demonstrated in terms of response speed, reduction of the frequency deviations and tie-line power deviations, robustness against parameters’ uncertainty, and disturbances occurring to the two-area microgrid