Cut the onions in half and slice them thinly crosswise; you should have about 10 heaping cups of onions.
Heat the oil in a heavy 5 or 6-quart stock pot with a tight-fitting lid and add the onions, turning them over repeatedly in the oil to coat them. Add the sage and bay leaves, burying them in the onions. Season the onions with 2 teaspoons of kosher salt and a few grinds of black pepper, and lower the heat to a simmer. Cover the pot and cook the onions for 15 to 20 minutes, until they have softened and released their liquid, and the rosemary has wilted.
Remove the lid and add the vinegars, wine, honey, and sugar, stirring well. Season the mixture with 1 more teaspoon of salt and a few more grinds of black pepper. Maintain the heat at a steady simmer and continue to cook the onions for an additional 15 to 20 minutes, stirring the mixture often with a wooden spoon.
When the liquid has reduced by about half, pick out and remove the sage stems and bay leaves and continue cooking for another 15 minutes. Taste the confiturra and season with additional salt and pepper if needed.
As the liquid continues to reduce, you must be careful to keep stirring to prevent the confiturra from scorching. Continue cooking the mixture until it is soft, sticky, and moves from the bottom of the pan as you stir Be careful not to let it caramelize.
Allow the mixture to cool slightly, then spoon it carefully into sterilized jars. Seal the jars and process in a water bath if you plan to store them, or keep the confiturra refrigerated for up to two months.