Published: 2018-04-13 22:17:13 BdST
The first legs will be on Tuesday 24 and Wednesday 25 April, with the returns on May 1 and 2.
German champions Bayern and holders Real have met 24 times in Europe's premier competition and have eleven wins each from those encounters.
The pair clashed at the semi-finals stage in 2014 when the Spanish club won 5-0 on aggregate. They also met last season in the last eight when Real triumphed 6-3 on aggregate.
"I have to say, it's a cracking tie. A gigantic fixture, in a very positive way," said Bayern coach Jupp Heynckes, whose club have been knocked out by Spanish opposition in the last four seasons.
Having become the first side to win back-to-back titles in the Champions League era last season, Real Madrid want to be the first club since Bayern (1974–76) to claim three successive European Cups.
Emilio Butragueno, Real Madrid's Director of Institutional Relations said: "We need to get a good result in Munich to then take it back to the Bernabeu. At this stage of the competition it's impossible that you don't suffer.
"If we have to do so in order to get to the final, so be it. We really want to be there. It's been a tough Champions League thus far drawing Paris (St Germain), Juve and now Bayern."
Liverpool will have happy memories of their meeting with Roma in the 1984 European Cup final which was played in the Italian capital with the English side winning on penalties.
The game will reunite Liverpool's top scorer this season, Mohamed Salah, with his former club.
Roma reached the semi-finals after overturning a 1-4 first leg deficit against five-times champions Barcelona by winning 3-0 at home and progressing on the away goals rule.
Liverpool manager Juergen Klopp was at pains to play down any suggestion that the Serie A outfit was the easier draw for his side, who demolished Premier League leaders Manchester City to reach the semi-finals for the first time in 10 years.
"Whichever opponent we would have got, I would have said there is a chance because it is football -- so there is a chance against Roma," Klopp said at a news conference on Friday.
"But if anybody think this is the easiest draw then I cannot help this person; they obviously didn't see both games against Barcelona."
Liverpool will host Roma at Anfield on Tuesday, April 24 with Real at Bayern on Wednesday, April 25.
Bayern visit the Spanish capital on May 1 with Roma's Olympic Stadium hosting Liverpool on May 2.