Diesel engines rely solely on compression to raise the temperature of the air to a point where the diesel combusts when introduced to the hot high-pressure inside the engines combustion chamber.
In cold weather, engines are harder to start because the cylinder block absorbs a lot of heat from compression that is needed to ignite the diesel fuel. To help in starting, most engines use glow-plugs. Glow-plugs are heaters in the in the combustion chamber or pre-chamber that help heat up the air, and they do help. If you have them, use them.
When the temperature drops, engine oil, and fuel oil become thicker. The viscosity increases. This resistance to flow can cause substantial oil restriction to bearings, pumps and other critical components resulting in premature wear or catastrophic failure. One of the best ways to keep the oil viscosity low and the engine warm is to use an oil pan heater. Silicone oil pan heaters are inexpensive. While you are heating oil in the bottom of the engine, heat rises from it often helping to warm up the rest of the engine.
For complete engine heating, a recirculating engine coolant heater is your best choice, but it is a more expensive option. Engine block heaters also work but are not as efficient and often not thermostatically controlled. You must remember to turn them off and not run the engine with them on.
The most significant cause of a generator not able to start in cold weather is a cold battery! As a battery reaches freezing temperatures, it is only about 40% efficient. That may not be enough to operate glow-plugs or crank the engine. A battery is also subject to freezing if not fully charged. It will freeze like water if discharged. A 100 percent fully charged battery will not freeze until approximately minus 76 degrees Fahrenheit. Two things you should do. First, keep your battery charged by adding a battery trickle charger and second, keep your battery warm with an electric battery blanket.