You can do the above well before you're ready to make the rice - it just gets it out of the way so you can go relax and have a drink with your guests.
When you're ready to make the rice, pour the water into your unwashed stock pot, and set on the stove over high heat. When the water comes to a boil, pour in your rice, reduce the heat to low to medium-low, stir the rice with a fork, and set a lid over the top. Stir the rice with a fork every few minutes, to make sure it doesn't stick together (or to the pot).
After the rice has been cooking for around 15 - 17 minutes, see how much of your water is remaining (there shouldn't be much). Pour in your rosemary and the onion mixture you have in the bowl, stir it into the rice, cover the pot, and remove from the heat. Let sit for 5 minutes, then serve.