Preheat the oven to 400F.
Peel the onions and trim the ends; fit them snugly in a small cast iron skillet or other baking dish. If you like, cut the top off a head of garlic and nestle it in alongside.
Drizzle generously with oil, pull the leaves off a couple sprigs of thyme and sprinkle them overtop (or just toss the sprigs in whole) and sprinkle with salt and freshly ground pepper. Roast for 30-45 minutes, until the onions are soft and golden.
Make a space by pushing the soft onions aside, and set a wedge or small wheel of Brie or Camembert in among the onions. Score the rind on the top of the cheese and drizzle with a little more oil; if you like, add a pinch of thyme to the top of the cheese, too. Return to the oven for a few minutes, just until the cheese starts to melt. Serve immediately, with crackers and crusty bread for dipping.