Cook spaghetti in a large saucepan of salted boiling water, following packet directions, until al dente or cooked to your liking.
Meanwhile, heat oil in a large frying pan over medium-high heat. Add bacon and onion and cook, stirring often for approximately 4 minutes or until light golden. Add mushrooms and simmer for a further 4 minutes or until mushrooms are tender.
Drain spaghetti and return to saucepan. Whisk eggs in a small bowl with a fork. Add eggs, mushroom mixture, parmesan and salt and pepper to spaghetti and toss until well combined. Place saucepan over medium heat and toss for 1 minute or until egg mixture has just set. Serve immediately.