Pre heat the oven to 425 degrees.
Cut potatoes into 1 ½ inch sized pieces.
Combine potatoes and pearl onions in a bowl and drizzle with 3 Tablespoons of olive oil and season with salt and pepper.
Brush a sheet pan with olive oil. Dump the potatoes and onions on the pan and spread out.
Cover the pan with aluminum foil and roast in the oven for 20 minutes.
Cook the bacon in a medium skillet for 3 to 5 minutes until the bacon is crisp. Remove the bacon onto a paper towel lined plate. Reserve the bacon drippings in the pan.
Re heat the bacon drippings over medium high heat. Add the shallots and garlic and saute for 4 minutes or until the shallots are soft. Add the sherry wine vinegar - reduce heat to medium and add the potatoes and onions and the remaining 2 Tbsp. olive oil. Stir until potatoes and onions are coated with vinegar/oil dressing. Stir in the remaining bacon and the thyme. Season with salt and pepper. Serve.
After 20 minutes, remove the foil from the potatoes and onions and return to pan to the oven. Roast for another 20 minutes, turning the potatoes halfway through.
Heat the pan with the bacon drippings over medium high heat. Add the garlic and shallots and cook for 3 - 4 minutes or until the shallots and garlic are tender and golden brown. Turn off the heat and reserve.
Remove the potatoes and onions from the oven and transfer to a large serving bowl. Drizzle the shallot and garlic mixture over and toss to combine. Add in the bacon and stir, and then the fresh thyme if using. Serve!