If you'd like to know how likely or rather unlikely peace between Azerbaijan and Armenia is, you might want to read this excerpt of a speech that Azeri president Aliyev held during the opening-ceremony of a new public school:
"I have repeatedly said that present-day Armenia, the territory, called the Republic of Armenia on the map, is an ancient Azerbaijani land. This is true. Certainly, Zangezur, Irevan khanate are our lands!...
Where did Stepanakert come from? This name was taken from the name of Stepan Shaumyan. If this city had a historical past, related to Armenians, would they have given this name?! Its historical name is Khankendi. This is the reality. Our children must know this, they should know that present-day Armenia locates in ancient Azerbaijani lands. In addition, they also want to create the second state in our territory. They want to create the second Armenian state on the historical Azerbaijani lands. We can never be able to agree on this and we will restore the territorial integrity of our country. By any way! I do not doubt this!"
So he considers Yerevan and many other cities of Armenia (besides Nagorny-Karabakh of course) as Azeri land. Now how could Baku make peace with Yerevan, if it considers Armenia's capital to be Azeri property? This is one of the many examples of how history blocks the path to a peaceful future in the Caucasus.
The full article can be found here.
An interesting insight into the Abkhazian conflict and the abuse of history (in German): Historikerstreit als ideologischer Wegbereiter des Abchasien-Konflikts