Or a low voltage house battery.
Even just 8 or 9 volts is enough to start the engine, but not enough to give a safe voltage on the output side so the genny shuts itself off to save letting the magic smoke out of electronics.
The down'n'dirty way to diagnose this is to start the genset, if it dies restart it, but this time don't release the start button. If it keeps running with the start button held down you can eliminate a dirty carb, plugged filter, etc., and be reasonably confident it's a 'safety' system issue or other electrical problem.
Ted 'n' Laurie, plus Jackson (aka Deputy Dog, the Parson Russell Terrier 'fur kid') and, Rylie (who crossed the Rainbow Bridge June 14, 2012).