Hi All,
I'm having an intermittent issue producing a consistently working Windows 2012R2 AMI. It seems that 1 out of every 3 builds produces an AMI that continually throws the message below when an instance created from it is accessed.
(Password not available yet. Please wait at least 4 minutes after launching an instance before trying to retrieve the auto-generated password)
My assumption is it has something to do with the timing of the call to sysprep, but I have no evidence of that. I am using the two provisioners below at the end of the config to restart, then kick off the sysprep process, is this correct for 2012R2 in AWS?
Should I put in a Start-Sleep for a minute or two (in the windows-shell provisioner) before kicking off the sysprep?
I'm curious to find out if anyone else has run into a situation such as this...
{
"type":"windows-restart",
"restart_timeout":"30m",
"restart_check_command": "powershell -command \"& {Write-Output 'restarted.'}\""
},
{
"type": "windows-shell",
"inline": ["\"c:\\Program Files\\Amazon\\Ec2ConfigService\\ec2config.exe\" -sysprep"]
}
Thanks in advance!
J