Distributed virtual inertia is an approach of providing synthetic inertia in small-scale modern grids dominated by converter-based generators. In this method, the inertial response of synchronous machines is emulated by the energy stored in the dc-link capacitors of grid-tied converters. Nonetheless, it results in instability of the interfaced converter in weak grids. To overcome this problem and get the most benefit out of the acceptable dc-link capacitor voltage deviations, a new compensation technique is proposed in this article. The grid-interactive converter in the presented framework is controlled in the current control mode, compositing of two conventional inner and outer control loops, distributed virtual inertia controller, and a novel compensator. The detailed small-signal representation of the whole control scheme in state-space form is derived. Then, it is revealed that the coupling between d- and q-axis controllers introduced by the distributed virtual inertia gain and its differential operator gives rise to the system instability in weak grids, which can be eliminated through the ancillary compensator. The time-domain simulation model is built to confirm the efficacy of the proposed control technique. The results depict that the ancillary active power provided by the proposed approach during frequency disturbance is 14% of the converter power rating of 20 kW, which yields the improvement of frequency rate of change by 18.82%.