Remove the soil from the mushrooms with a brush or cloth. Carefully pull out the stems, but do not throw them away, put them aside.
Finely dice the onion and the mushroom stalks, cut the chives into fine rings, grease a tray or simply a baking dish, place the mushroom heads on top with the hole facing up. Preheat the oven to around 200 ° C (top / bottom heat).
Briefly fry the mushroom and onion cubes in a little butter with the ham cubes in a pan. Mix the onion, mushroom and ham mixture with the sour cream in a bowl, stir in the chives and season with salt and pepper. But be careful with the salt, the ham cubes are already salty.
Pour the mixture into the mushrooms, sprinkle some grated cheese over each mushroom, put the mushrooms in the oven and bake for about 15-20 minutes, until the mushrooms are nicely baked and the cheese browns slightly.