Sorry, had to run out of town for a family issue.
Surging on a diesel is more difficult to track down than on a gas unit, but you need to start with first checking the inside of the genset carefully any leaks, and then changing the fuel filter.
After you have done that, if it is still surging, you need to do a fuel flow test.
To do a fuel flow test, get underneath the genset, and remove the return fuel line. It is marked on the side of the genset.
Attach a piece of fuel hose to the nipple, and run the hose into an empty container of at least 1 quart capacity.
Press and hold the STOP/PRIME button for exactly 1 minute.
In 1 minute, it should pump a minimum of ½ pint of fuel. If it does not, there is an issue with the pump or the supply lines.
If this still does not take care of the problem, I will need the serial number of the genset.