Cut the onion into rings, chop the garlic into pieces.
Add sugar, salt, oil, bay leaf, garlic, pepper, vinegar to the water and bring to a boil.
Place the onion in a saucepan and keep on fire for 2 minutes.
Arrange the onion with marinade in sterile jars and sterilize for 10 minutes. Roll up cans, cover with a blanket until completely cooled.