This study proposes a hierarchical control structure for a smooth transition of multi-bus microgrids from islanded mode to grid-connected mode. The proposed control structure uses an average consensus protocol for the secondary control layer and Andronov-Hopf virtual oscillator control as a primary controller. The proposed method enhances the power-sharing accuracy among DGs in normal operation. A synchronization strategy is embedded into the secondary control layer in synchronization mode to force the MG-side voltage at the connection point to synchronize with the grid-side voltage. The influence of the secondary controller and communication time-delay on system stability and performance is analyzed with small-signal analysis. The proposed method is validated via control-hardware-in-the-loop (CHiL) using a real-time Opal-RT platform.