Script wrapper was not providing me with the stability I desired so I have ended up with two solutions. For one project I've created a pre-provisioned domain controller
https://atlas.hashicorp.com/cdaf/boxes/WindowsServerDC For another, I'm continuing to provision the AD role, (this run nightly as part of a regression suite and I now have 9 consequtive successes), the script (see http://cdaf.io) executes Forest creationg with -NoRebootOnCompletion and then performs a restart explicitely, this (so far) appeases Vagrants WinRM connection tests, the connection is re-established and provisioning proceeds. ==> dc: [newForest.ps1] Install-ADDSForest -Force -NoRebootOnCompletion -DomainName "sky.net" -SafeModeAdministratorPassword $securePassword ==> dc: Message : You must restart this computer to complete the operation. ==> dc: ==> dc: Context : DCPromo.General.4 ==> dc: RebootRequired : True ==> dc: ==> dc: Status : Success ==> dc: ==> dc: [newForest.ps1] shutdown /r /t 0 ==> dc: [newForest.ps1] ---------- stop ---------- ==> dc: [newForest.ps1] ---------- start ---------- ==> dc: ==> dc: [newForest.ps1] New Active Directory Forest, requires Windows Server 2012 and above. ==> dc: ==> dc: [newForest.ps1] forest : sky.net ==> dc: [newForest.ps1] password : ********** ==> dc: [newForest.ps1] media : c:\.provision\w2k12R2.wim ==> dc: ==> dc: [newForest.ps1] wimIndex : 2 ==> dc: [newForest.ps1] controlReboot : yes (default) ==> dc: Host WIN-HAFG83EVPR4 verified domain member of sky.net ==> dc: ==> dc: This is normal in Vagrant run after reboot for the provisioner to re-run. ==> dc: ==> dc: [newForest.ps1] ---------- stop ---------- Note: the Domain Controller image was built using the same script as is executed nightly. -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/f3656f77-fe81-4475-82cd-89046450ad17%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
