Had a similar problem with our Onan Microquiet 4kw a couple of years ago. It would run for 10-15 minutes then surge and quit. Wouldn't restart, but if I waited about 1/2 hour, it would start and run for another 10-15 minutes. A new fuel pump fixed the issue.
I was able to troubleshoot the problem by using the "prime" function, which runs the pump without cranking the engine. Normally I can hear the pump buzzing when I use prime, but after the gen shutting off by itself, I got no sound from the pump. Since your older gen probably doesn't have a prime function, try disconnecting the fuel line from the carburetor immediately after the gen quits. Crank the engine and see if fuel squirts into a bucket or jar. No fuel, bad pump.