Okay, so that rules out fuel.
Sorry if I am repeating anything here, but just putting my thought process out there.
We for sure have 1 of 3 things then. Fuel. Now, do we have air & compression?
Air should be an easy test. I see your air filter is off. Put your hand over the intake as you are cranking & see if it is sucking in as it should. That will answer if you have air.
For compression... if your pull start cord good? Most of the time with these Yanmar engines, if you can't pull past the compression cycle, it is good. That is why the decompression lever is on the valve cover. If you can't pull past it, then your good.
If all three are good, valves may be off. These are VERY finicky. I have found on some that they need to be set slightly out of spec to make up for wear.
The starter kicking out makes things more of an issue. Sometimes it takes a lot of cranking to purge air bubbles. If you can't find out why the starter is being stopped, I would wire a direct button from the battery to started solenoid so you can keep it cranking.If you don't have a momentary switch, attach a wire to the started solenoid & then you can just touch it to the battery. Make sure your switch on the generator is in run.