Vilanova died earlier this week aged 45 following a battle with cancer that forced him to stand down at the end of last season.
"We lived through a lot together," Guardiola told reporters following his team's 5-2 win over Werder Bremen on Saturday.
"We lost together, we won together. It is a very difficult situation. This sadness will follow me forever."
Bayern held a minute's silence before their league game and the players wore black armbands in memory of the coach, with the club issuing condolences in both German and Spanish.
Vilanova took over at the Nou Camp ahead of the 2012-13 season having been Guardiola's assistant during the most successful period in Barca's history in which they won three out of four La Liga titles and two Champions Leagues in 2009 and 2011.
Vilanova, a former midfielder, made his mark as a coach and began working with the Barcelona youth teams, training future first team players like Lionel Messi, Gerard Pique and Cesc Fabregas.
After several seasons away from the Catalan club he returned in 2007 as assistant to Guardiola with the Barca B team. The following season the pair took charge of the first team and Vilanova went on to play a key role in the club's success.
- Sports & Recreation
- Werder Bremen