Place oven rack in center position and preheat oven to 350°F. Add one tablespoon olive oil in a large, high-sided skillet over medium heat. Add the mushrooms and shallots and season with salt and black pepper to taste.
Cook, stirring occasionally, until the mushrooms and shallots develop a bit of color and soften, approximately 4-5 minutes. Remove from heat and transfer to a bowl and set aside.
Place the remaining olive oil in a small bowl. Add the rosemary and garlic to the oil and season with salt and black pepper to taste. Rub the rosemary-garlic mixture on top and all along the sides of the beef. Arrange the sliced red onion on the bottom of the same skillet and place the seasoned beef tenderloin on top of the onions.
Arrange the mushroom and shallot mixture around the sides of the beef and place in the pre-heated oven for 45-50 minutes for medium rare or longer for more well done results. Remove from oven and rest for 10-15 minutes, tented by foil, before you cut the beef for serving.
1 1/2 tablespoons dried rosemary may be substituted for fresh.If your beef tenderloin has a tapered end, the butcher may tie it for you - or it may come already tied. See my notes in the post for info about this including a video.Actual cooking time will vary depending on a number of factors, including the starting internal temperature of the beef. Allow the beef to rest at room temperature for 20-30 minutes before roasting and use an instant-read thermometer to check for doneness. For medium-rare, remove from oven at 140°F. The temperature will rise to 145°F as it rests.