What is Windows doing with my harddisk after boot and before login?
I'm playing around with Win10 VM live snapshots, to minimize startup times for my CI-runners. The idea is to have a pre-booted snapshot that can be launched within seconds.
So I'm preparing an image (installing all the tools that I'm going to need) and power off the VM. Then I boot the VM up to the login screen, and then take a live snapshot.
The issue I'm facing is, that after booting the VM up to the login screen (without actually logging in), the VM starts to access the harddisk (both reading and writing significant amounts of data) for a while (a couple of minutes). I only want to take the snapshot, once this activity has settled down (so that when re-starting the live snapshot, the VM is ready to do my tasks rather than some maintenance disk processes).
I've disabled autoindexing, but to no avail.
So my question is:
- What is Win10 doing with my harddisk right after the startup has completed?
- Can I somehow tune my system, so it doesn't?
I guess that Win10 displays the login screen early in the boot process (so people get happy by the impression of a fast-booting system) and then finishes the boot process (while happy people are getting their coffee and then slowly typing in their passwords).
If so, can I somehow determine when the boot process has finished properly and is ready for a live snapshot (rather than anxiously watching the disk activity and once it appears to have stopped do the snapshot)?
Windows is busy starting services during these two minutes of activity.
If you look into the properties of the services listed by the Services applet, you will see that some are set to "Startup type" of "Automatic", while some are set to "Automatic (Delayed Start)".
The "Automatic" system services will start immediately after the boot, while the "Automatic (Delayed Start)" services are started after a delay. The default delay is 120 seconds, or 2 minutes.
The delay time of any one service can be adjusted in the registry in:
HKLM\SYSTEM\CurrentControlSet\services\<service name>\AutoStartDelay
However, it's unclear what changing the delay will do, and how it will affect the interplay between services on startup.
My advice: Wait 2-3 minutes before taking the snapshot.
Reference: How to delay the start of a specific service in Windows Services?