Caramelised red onion chutney

Caramelised red onion chutney
Ingredients
9 medium red onions
2 medium shallots
1 red, dried chilli pepper
270 ml balsamic vinegar
50 ml red wine vinegar
220 g brown sugar
1 cinnamon stick
2 bay leaves
A sprig of rosemary
A little olive oil for frying
Preparation
The chutney is the ideal accompaniment to pan-fried meat such as steak, or to cheese. 
Peel the onions and shallots and cut into thin slices. Pluck the rosemary needles from the sprig and chop finely. Heat the olive oil in a large pan, and fry the onions and shallots over a low heat until they have collapsed into themselves and are lightly browned (approx. 30 minutes).
Add the bay leaves, the cinnamon and the rosemary and continue to fry for several minutes. Crush the chilli pepper and add to the mixture.
Now the preserving (the real nitty-gritty!) can begin:
Place jars and matching lids in the desired sizes in a water bath and boil gently for 5 minutes to sterilise. Remove the jars using a pair of tongs and drain and dry on a clean dishcloth upside down.
Spoon the onion mixture into the jars. Then add the two types of vinegar and the sugar. Seal the jars with lid, preserving ring and spring clips.
Place the jars in the preserving boiler and fill with enough water that the jars are 3/4 immersed (the jars can also be stacked - it is possible to immerse them completely). Heat the water to 90 °C. When this temperature is reached, preserve for 30 minutes.
Remove the jars from the preserving boiler, place on a dishcloth and leave to cool completely. Then remove the spring clips and do a “lid test”: Pick the jar up by the lid - and if it remains tightly shut, the jar is hermetically sealed.