Although you indicated the oil was full, check the oil level AGAIN and AGAIN to be SURE the crankcase is full. If the oil is even a slightest bit under the full mark, the generator will behave exactly as you describe.
I serviced my Onan 6300 and refilled the crankcase with the specified quantity of oil. It would start and run as long as I held the start switch, but release the switch and it stopped. After much checking and many suggestions from very helpful posts, and MANY of them urged me to check for low oil level, I did go back and manually check the dip stick oil level. Oil was not quite up to the full mark on the dip stick, and so I added enough oil to bring it to the full mark on the dip stick. Now remember I had already filled it with the Onan specified amount, 3 1/2 quarts, BUT the final solution was the oil was not up to where it should be and the generator would not run. Filled the crankcase and it started up and runs just like it should. SO the moral of this is CHECK and FILL the oil to the fill mark on the dip stick.
Good Luck
CarlGeo