We are A ok asking for help fixing anything connected with camping or a Sunline, so a Gen set for sure qualifies.
While I don not know your exact Gen set, I use to have a small engines repair business a long time ago so there are only some many things that can cause what you are describing.
If it runs great with you holding the button and dies when you release it, it points to the switch or something some how killing the ignition.
Do you know if this unit has a magneto or a coil for the spark ignition? If it has a magneto something is grounding out the run signal as that is how you stop them. If it is a coil that runs off a battery used for electric start, then the power to the coil if dropping out.
Do you have a volt meter? And are motor electric friendly?
And what about an Onan Model/serial number. I can look up and see if they have a cut sheet on exactly what you have so I can see what you are up against and better point where to go look.
I know Kitty and EMD_Driver have and Onan genset but do not know models etc.
Glad to help as I can
As a last resort some pics with showing the system electrical so I can figure out what you have.
Current Sunlines: 2004 T310SR, 2004 T1950, 2004 T2475, 2007 T2499, 2004 T317SR
Prior Sunlines: 2004 T2499 - Fern Blue
2005 Ford F350 Lariat, 6.8L V10 W/ 4.10 rear axle, CC, Short Bed, SRW. Reese HP trunnion bar hitch W/ HP DC
Google Custom Search For Sunline Owners Club