09:50:03 [0;32m amazon-ebs: AMI: ami-cad37ebd [0m 09:50:03 [1;32m==> amazon-ebs: Waiting for AMI to become ready... [0m 10:01:48 [1;32m==> amazon-ebs: Terminating the source AWS instance... [0m 10:11:57 [1;32m==> amazon-ebs: Deleting temporary keypair... [0m 10:11:57 [1;32mBuild 'amazon-ebs' finished. [0m
-> 11 minutes to create the ami
-> 10 minutes to stop the source instance?? This can be done in just a second
--
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
// Terminate the source instance if it exists
if s.instance != nil {
ui.Say("Terminating the source AWS instance...")
if _, err := ec2conn.TerminateInstances([]string{s.instance.InstanceId}); err != nil {
ui.Error(fmt.Sprintf("Error terminating instance, may still be around: %s", err))
return
}
stateChange := StateChangeConf{
Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"},
Refresh: InstanceStateRefreshFunc(ec2conn, s.instance),
Target: "terminated",
}
WaitForState(&stateChange)
// Terminate the source instance if it exists
if s.instance != nil {
ui.Say("Terminating the source AWS instance...")
if _, err := ec2conn.TerminateInstances([]string{s.instance.InstanceId}); err != nil {
ui.Error(fmt.Sprintf("Error terminating instance, may still be around: %s", err))
return
}
stateChange := StateChangeConf{
Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"},
Refresh: InstanceStateRefreshFunc(ec2conn, s.instance),
Target: "shutting-down",
}
WaitForState(&stateChange)