Abstract
Mass loss dominates the evolution of very massive stars, although the mass loss rates are not known exactly, particularly once the star has left the main sequence. Studies of the ring nebulae and HI shells that surround many Wolf-Rayet (WR) and luminous blue variable (LBV) stars provide some information on the previous mass-loss history. During the main sequence and WR stages, the highly supersonic stellar winds blow bubbles in the interstellar and circumstellar medium. These two stages are separated by phases where the star loses mass with a very high mass-loss rate but at low velocity. The presupernova environment is thus determined by the progenitor itself out to distances of some tens of parsecs from the star. In this article, numerical models are used to illustrate the different stages in the evolution of the circumstellar medium around a 40M⊙ star.