If sysprep is enabled, then the SetSetupComplete.cmd is executed, which configures the C:\Windows\Setup\Scripts\Setupcomplete.cmd and disables the cloudbase-init service.
sc config cloudbase-init start= auto && net start cloudbase-init
C:\Windows\Setup\Scripts\Setupcomplete.cmd gets executed at the end of the sysprep.
Sometimes we need cloudbase-init service to be set to auto delayed start, to make sure that all the Windows services are up and running when cloudbase-init runs. This scenario might fix the problems with NETLBFO bond, when cloudbase-init tries to create the bonds, but the bonding networking services are not ready and silent failures can occur.
if set to auto, disabled, manual or auto-delayed, then the SetSetupComplete.cmd will not be executed and the service will be set to the desired startup type.
If sysprep is enabled, then the SetSetupComplete.cmd is executed, which configures the C:\Windows\Setup\Scripts\Setupcomplete.cmd and disables the cloudbase-init service.
C:\Windows\Setup\Scripts\Setupcomplete.cmd content:
C:\Windows\Setup\Scripts\Setupcomplete.cmd gets executed at the end of the sysprep.
Sometimes we need cloudbase-init service to be set to auto delayed start, to make sure that all the Windows services are up and running when cloudbase-init runs. This scenario might fix the problems with NETLBFO bond, when cloudbase-init tries to create the bonds, but the bonding networking services are not ready and silent failures can occur.
The solution:
[cloudbase_init] cloudbase_init_delayed_start=False
if set to auto, disabled, manual or auto-delayed, then the SetSetupComplete.cmd will not be executed and the service will be set to the desired startup type.