I'm afraid that's not exactly the correct way to do it... I doubt you'd find a gen set with a plug on it, exposing live pins while the set is running!
Basically you need a standard 32A extension cord with plug and trailing socket. Plug goes into the generator, trailing socket connects to the wall-mount socket.

Friends of mine have such a setup, transfer switch in the main panel, plug in the garage (I think 16A red CEE) and a short extension cord. 3ph generator that is powered by the tractor. Whenever there's a power outage they just switch over and fire up the generator.