Extreme incidents can cause diverse and dynamic disruptions to active distribution networks (ADNs). Thus, ADN operators (DNOs) must plan to prepare for and adapt to changes in conditions to withstand and quickly recover from such disruptions. This paper proposes a cooperative planning framework to design optimal microgrids (MGs) in smart ADNs integrated with virtual power plants (VPPs) to quickly reconfigure and recover during such events. The proposed framework has two parts: 1) optimal partitioning of ADNs with integrated VPPs into supply-sufficient MGs; and 2) the scheduling of the partitioned MGs. Since the VPPs are autonomous, a smart DNO and VPP interface and operating model for dynamic operating envelopes (DOEs) is proposed to quantify and integrate the supply capacity of VPPs in the operation of MGs. As part of this framework, three optimization models are formulated including VPP optimization, ADN partitioning, and a partitioned ADN scheduling model, where the uncertainty of r