Cloudbase-init localscript exitcode 1003 won't restart when converting Windows Server 2019 to a DomainController
See original GitHub issueI’m stucked with this error since May 2022 and I didn’t find any solution. I also opened a discussion here ask.cloudbase.
It happens only with Windows Server 2019
I tried these configurations:
- windows server 2019 from official trial iso without any updates + Cloudbase-init 1.1.3dev16
- windows server 2019 from official trial iso without any updates + Cloudbase-init 1.1.2
- windows server 2019 from official trial iso WITH ALL updates + Cloudbase-init 1.1.3dev16
I sysprepped all of these configurations and used a Powershell script (via local scripts) to convert the OS into a DomainController.
In my powershell script I install required features:
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Install-WindowsFeature RSAT-AD-Tools -IncludeManagementTools
exit 1003
This part of the script works as expected!
Then I create the forest and reboot again with exit 1003:
$secureSafeModePassword=(ConvertTo-SecureString "SafePass1!" -AsPlainText -Force)
Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "Win2012R2" `
-DomainName "testdomain.corp" `
-DomainNetbiosName "TESTDOMAIN" `
-ForestMode "Win2012R2" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$true `
-SysvolPath "C:\Windows\SYSVOL" `
-SafeModeAdministratorPassword $secureSafeModePassword `
-Force:$true
Restart-Computer -Force
exit 1003
But this time, cloudbase-init returns an error as shown in log file:
INFO cloudbaseinit.init [-] Rebooting
ERROR cloudbaseinit.init [-] reboot failed with error 'Reboot failed: ''Arresto del sistema già pianificato.'': cloudbaseinit.exception.WindowsCloudbaseInitException: Reboot failed: 'Arresto del sistema già pianificato.'
INFO cloudbaseinit.init [-] Process execution ended with exit code: 0
The Italian message says “System shutdown already planned”.
Do you have any suggestion? Feel free to ask for more information, because I can reproduce this problem very easily. The problem is that I cannot convert Windows Server 2019 into a domain controller with Cloudbase-Init. This error happens EVERY TIME. I think that this is a big problem, because it makes cloudbase-init broken on Windows Server 2019 to create a Domain controller.
Is there a workaround? Thank you.
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:11 (4 by maintainers)
Top GitHub Comments
Hello,
We have not seen this error so far with the initial testing of the feature a while back: https://github.com/openstack/heat-templates/blob/master/hot/Windows/ActiveDirectoryController/AD.psm1#L20
I am going to try to reproduce this error on a 2019 with latest updates and will try to raise the issue upstream, I think it s the flag that s not respected in the implementation.
Thank you, Adrian.
Unbelievable, I fixed this problem installing Clodubase-Init 1.1.2 as LocalSystem (the checkbox available in the installer). Now it’s working on windows-server-2019