The 26-year-old will remain at Scotstoun until 2019 and complete ten years of service with the Warriors prior to the conclusion of the new deal.
Dunbar said: “Glasgow Warriors is a great club and I’m really enjoying my rugby just now, so it was an easy decision when it came around.
“Over the last few years I’ve started to get regular game-time and hopefully we can keep improving.
Head coach Gregor Townsend added: “It’s great news that Alex will be staying in Glasgow for at least another two years.
“He has worked hard to improve his game - and has come back from some untimely injuries - to become an important player for the club.”