Smart grid is envisioned to incorporate local distributed power generation for better efficiency and flexibility. Distributed generation, when not used carefully, however, may compromise the stability of the grid. Recently, researchers have proposed innovative architectures (e.g., microgrid, LoCal grid) that virtualize a local generator as a constant load, source, or zero load to the grid, thus offering great promise to connect distributed generation into the grid without sacrificing its reliability. In fact, intuitively, using these architectures, distributed generation may enhance the stability of the power grid. In this paper, we develop a simulation model to quantify how much distributed generation can mitigate cascading failures. Applying this model to IEEE power grid test cases, we find that local power generation, even when only using a small number of local generators, can reduce the likelihood of cascading failures dramatically.