Maintaining power system stability in renewable-rich power systems can be a challenging task. Generally, the renewable-rich power systems suffer from low and no inertia due to the integration of power electronics devices in renewable-based power plants. Power system oscillatory stability can also be affected due to the low and no inertia. To overcome this problem, additional devices that can emulate inertia without adding synchronous machines can be used. These devices are referred to as virtual synchronous machines (VISMA). In this paper, the enhancement of oscillatory stability of a realistic representative power system using VISMA is proposed. A battery energy storage system (BESS) is used as the VISMA by adding an additional controller to emulate the inertia. The VISMA is designed by using Fruit Fly Optimization. Moreover, to handle the uncertainty of renewable-based power plants, the VISMA parameters are designed to be adaptive using the extreme learning machine method. Java Indonesian Power Grid has been used as the test system to investigate the efficacy of the proposed method against the conventional POD method and VISMA tuning using other methods. The simulation results show that the proposed method can enhance the oscillatory stability of the power system under various operating conditions.