Why would I need the “Plug and Play” service in a Windows Server hosted in a VM

windows-server-2008-r2windows-service

I'm reviewing the logs of a Windows Server 2008 R2 server which is running inside a VM. The server hosts an Azure web role. The logs contain this record:

The Plug and Play service entered the running state

This is completely unattended server hosted inside a VM.

Why would it need this service in the first place?

Best Answer

Among other things you need this service to enumerate both new and, at boot time, existing hardware.

According to this Wikipedia's article the Plug and Play Service implements the bulk of the work done by the Plug and Play Manager. The PnP Manager is responsible for hardware detection and resource management, including boot-time detection:

The Plug and Play (PnP) manager provides the support for PnP functionality in Windows and is responsible for the following PnP-related tasks:

  • Device detection and enumeration while the system is booting
  • Adding or removing devices while the system is running

Further, during system startup the PnP Manager loads the file system drivers and drivers marked SERVICE_BOOT_START as described in the MSDN article What Happens to File Systems During System Boot:

The PnP Manager calls the DriverEntry routines of the RAW file system and all SERVICE_BOOT_START drivers.

For these reasons and more it's appropriately stated in the service's description Stopping or disabling this service will result in system instability.