The VMM initializes a virtual device by doing the following:
1. Loads the real-mode initialization segment and calls the real-mode initialization procedure. The procedure can prevent the virtual device from being loaded, prevent Windows from starting, specify instance data for the device, and select pages in memory for its exclusive use.
2. Loads the rest of the virtual device segments in 32-bit, flat-model protected-mode memory and discards the real-mode initialization segment.
3. Sends a Sys_Critical_Init message to the device control procedure. Hardware interrupts are disabled, so the virtual device should spend as little time as possible initializing itself.
4. Sends a Device_Init message to the device control procedure. Hardware interrupts are enabled, so the virtual device must be prepared to manage interrupts from its own device.
5. Sends a Init_Complete message to the device control procedure.
6. Discards the initialization code and data segments, freeing this memory for other uses. The virtual device must not attempt to access the procedures and data in these segments after it has processed the Init_Complete message.
At any time during initialization, a virtual device can set the carry flag and return to the VMM to prevent the virtual device from loading. Some VMM services, such as the Initialization Information services, are available only during initialization.