What you have mentioned is all true except for the 6 months stay.

It is required that your Residence Permit be valid a minimum of 6 months on the remining period, irrespective of your number of months stay n Qatar.