Cover each garlic bulb in aluminum foil and bake at 350 degrees F for 30-45 minutes or until successfully roasted (the garlic will be soft).
Squeeze the roasted garlic into a deep, heavy bottomed pot. Toss in the sliced onions, balsamic vinegar, water, and pectin. Stir well.
Bring the contents of the pot to a full rolling boil.
Stir in the sugar, and return the mixture to a full rolling boil that reaches a temp of 220 degrees F. Boil hard for 2 minutes, stirring constantly. Remove from heat. Skim off any foam with a metal spoon.
Immediately ladle jam into hot, sterilized, half pint canning jars. Allow 1/4 inch headspace per jar. Wipe jar rims and adjust lids. Process in a hot water bath for 10 minutes (start timing when water starts to boil).
Remove jars from water bath; cool on counter or wire rack. As jars cool, they will seal (you will hear them "ping"). Jars may take up to 24 hours to seal - once sealed, lids will not bounce back when pushed down. Recipe makes 4 half pints