At Real Madrid, it's not enough to play good soccer. It's also about satisfying egos, handling the press and winning trophies. This pressure is much greater than what Alonso experienced at Leverkusen. Alonso has a lot of potential to succeed in star management because he knows this environment as a footballer and he is intelligent. Xabi Alonso is also a former Real Madrid player. He knows the culture of the club and the dynamics in the dressing room. This could help him build a natural relationship of respect with the players.
It's clear that Alonso is under immense pressure at Real Madrid, unlike when he coached Leverkusen, where there wasn't as much pressure. Indeed, at Real Madrid, it's certainly a tough challenge for Alonso, as Real Madrid fans want to see a better Real Madrid, given the club's many star players.
But considering that Xabi Alonso is a former Real Madrid player and a top-tier central midfielder, he understands the current situation. He will certainly do his best to make Real Madrid even better. Real Madrid certainly made the right choice in choosing Alonso as Ancelotti's replacement, as he has the potential to improve Real Madrid and will understand and be tolerant of the Real Madrid players.
Certainly, Alonso's current task is to improve his players so they aren't selfish in their play. Real Madrid's defense, of course, needs to be improved, as the lack of strength in the back line is what makes it difficult for Real Madrid to consistently win.