In this paper, we propose a generation control strategy for islanded lossless microgrids with inverter-interfaced generators. In particular, we address the problem of obtaining a desired active power load sharing while regulating the frequency to some nominal value. The proposed control strategy is based on the slow readjustment of the active power reference of each inverter, i.e., each inverter aims to track a slowly-varying reference that is set sufficiently close to the actual active power injection, and, thus easy to track. The control enforces the trajectory to satisfy the so-called phase-cohesiveness property, i.e., the absolute value of the voltage phase angle difference across electrical lines is smaller than π/2, which ensures the system remains stable at all times, while achieving the desired active power load sharing. We also propose a method to find the active power reference distributively which satisfies the phase-cohesiveness property for tree networks as well as for some cyclic networks.