Closed Hello-Victor closed 2 years ago
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
I want to build an AMI from the existing Ubuntu 22.04 LTS. But I got an SSH timeout error. Does anyone have the same issue?
This is the my packer file:
variable "aws_region" { type = string default = "us-east-1" }
variable "source_ami" { type = string default = "ami-08c40ec9ead489470" # Ubuntu 22.04 LTS }
variable "ssh_username" { type = string default = "ubuntu" }
variable "subnet_id" { type = string default = "subnet-06b5d2da83188b692" }
source "amazon-ebs" "devami" { region = "${var.aws_region}" aminame = "csye6225${formatdate("YYYY_MM_DD_hh_mm_ss", timestamp())}" ami_description = "AMI for CSYE 6225" ami_regions = [ "us-east-1" ]
ssh_interface = "private_ip" instance_type = "t2.micro" source_ami = "${var.source_ami}" ssh_username = "${var.ssh_username}" vpc_id = "vpc-0667721632b318101" subnet_id = "${var.subnet_id}"
launch_block_device_mappings { delete_on_termination = true device_name = "/dev/sda1" volume_size = 8 volume_type = "gp2" } }
build { sources = ["source.amazon-ebs.devami"] provisioner "shell" { environment_vars = [ "DEBIAN_FRONTEND=noninteractive", "CHECKPOINT_DISABLE=1" ] inline = [ "sudo apt-get update", "sudo apt-get upgrade -y", "sudo apt-get install nginx -y", "sudo apt-get clean", ] } }
This is the log: