I did exactly same job on 2000 auto 540i (including head gasket), rented the tools and setup vanos properly with a multimeter. The hardest part of it is to take out the Jesus bolt and after job is done tighten it to torque.
Ended up replacing the engine as a helping friend decided tooo spray right side of the engine…