Start-LabConfiguration checks whether your lab host needs to reboot, and will fail to build the lab if it does.
That error might look like this:
WARNING: [10:49:19 AM] A pending reboot is required. Please reboot the system and re-run the configuration. Host configuration test failed and may have a pending reboot. At line:137 char:13 + throw $localized.HostConfigurationTestError; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (Host configurat...pending reboot.:String) , RuntimeException + FullyQualifiedErrorId : Host configuration test failed and may have a pending reboot.
Cause of pending reboot
Lability uses a local copy of Microsoft’s
xPendingReboot DSC resource.
Get-TargetResource function of
for the implementation.
At the time of this writing, that module triggers a pending reboot warning based on:
- Component based servicing
- Any pending Windows Updates
- Any pending file renames (this can occur if you attempt to rename files that are in use, such as when running uninstallers)
- Any pending computer renames (including domain/workgroup changes)
In my experience, even normal use of my laptop could trigger a pending reboot error, usually related to pending file renames.
Start-LabConfiguration has a
-IgnorePendingReboot parameter which will bypass this check entirely.
The documentation provides no hints as to what kinds of problems this can solve.
That said, I have not experienced any problems by passing
-IgnorePendingReboot every time.