Add the onions, some salt and a couple tablespoons of cold water.
Cover and simmer over very low heat until onions have softened to the point of being puree-like, about 20 to 30 minutes. Make sure onions do not dry out. Add water by the teaspoon as needed.

Meanwhile cook the pasta.
Towards the end of the pasta cooking time, mix the beaten eggs and mix with the onions and keep warm.
When done to taste, drain, reserving a 1/4 cup the cooking water.
Place pasta in a warm bowl and pour on the onion sauce with a few grinds of the pepper mill and combine well.
Pass the Parmesan at table.