When a property is sold, you have to evaluate whether or not there is a capital gain.
In this case, your rental property would be deemed to be disposed of and your capital gain would be what your new house is worth on the day you move in, minus the purchase price and any capitalized renovations. You would need to get an appraisal done when you move in.
However, in this case, there is an interesting option called a subsection 45(3) election.
Basically, when you change your rental or business property to a principal residence, you can elect to postpone paying the capital gains taxes until you actually sell the property which was formerly a rental.
This allows you to defer the tax bill.