The successful trainer will take charge of the Bundesliga powerhouse for the first time in a friendly against Hansa Rostock in July
The 42-year-old took a one-year sabbatical after leaving Barcelona at the end of the 2011-12 campaign, but the Bavarians announced in January that he would replace Jupp Heynckes at the season's end.
And his first game in charge of his new team will be against the cash-strapped 3. Liga side, who are seeking to make up a deficit of just under €6.6 million.
"The willingness of this world-famous club to support us is phenomenal. Bayern Munich have managed to stay a family club with a heart despite their size," Hansa CEO Michael Dahlmann told the club's official website.
"We take our hats off to them and sincerely thank them for their help."
Guardiola's first appearance in the Allianz Arena dugout will be against Barcelona 10 days later.