You'll have problems finding somewhere to mount the ballasts. I did this back in the day during 2004 with some Hella ballasts and Ultinon 6k bulbs.
Further, the halogen lens is not desinged to throw out xenon light so be prepared to glare oncoming traffic! Nothing pisses me off more than some twit with an aftermarket HID kit in reflector (non-projector lens) headlight housings (I.E. old E46 prefacelift)- very dangerous at night and in the rain. In the Z4 it may not be so bad due to the projector style lens, that said there will still be dangerous glare that is thrown out as the lens cannot handle the xenon light being emitted properly.
IMO, if you intend to do this retrofit- atleast get the xenon projector lens as well but even then you wont have bi-xenons as with OEM.