Preheat an oven to 180°C.
Melt the butter and the Guinness in a pan over low heat. Add the sugar, vanilla extract and cocoa powder and mix well until smooth.
Whisk the eggs and sour cream together, add the Guinness mixture, then finally add the flour and baking powder and mix well.
Divide between Guinness glasses so they are about ¾ full. Place on a tray and bake for 40 minutes until risen and cooked through. Allow to cool completely.
Place all the icing ingredients into a bowl and beat until smooth and fluffy. Level off the top of the cakes and spoon the frosting onto the top of each cake to look like the head on a pint. Enjoy!