I replaced my xenon bulbs without taking the whole headlight housing out.
You just have to pull the headlight housing forward, so you'll be able to reach all the screws on the cap of HID unit. I think there are 4 of them. You have to be careful while removing them so you don't drop the screws into the car. That's what I did with my 04 X5 3.0i.