Most have a ground lug that should be connected to house ground, but can be run with out it.
However this is right form what OSHA recommends:
https://www.osha.gov/OshDoc/data_Hurricane_Facts/grounding_port_generator.pdf
Grounding Requirements for Portable and Vehicle-mounted Generators Under the following conditions, OSHA directs (29 CFR 1926.404(f)(3)(i)) that the frame of a portable generator need not be grounded (connected to earth) and that the frame may serve as the ground (in place of the earth): • The generator supplies only equipment mounted on the generator and/or cordand plug-connected equipment through receptacles mounted on the generator, § 1926.404(f)(3)(i)(A), and • The noncurrent-carrying metal parts of equipment (such as the fuel tank, the internal combustion engine, and the generator’s housing) are bonded to the generator frame, and the equipment grounding conductor terminals (of the power receptacles that are a part of [mounted on] the generator) are bonded to the generator frame, § 1926.404(f)(3)(i)(B). Thus, rather than connect to a grounding electrode system, such as a driven ground rod, the generator’s frame replaces the grounding electrode. If these conditions do not exist, then a grounding electrode, such as a ground rod, is required. If the portable generator is providing electric power to a structure by connection via a transfer switch to a structure (home, office, shop, trailer, or similar) it must be connected to a grounding electrode system, such as a driven ground rod. The transfer switch must be approved for the use and installed in accordance with the manufacturer’s installation instructions by a qualified electrician.