Hi All,
I am trying to provision centos image for Nutanix platform using packer. Below is the template I am using:
source “nutanix” “centos” {
nutanix_username = var.nutanix_username
nutanix_password = var.nutanix_password
nutanix_endpoint = var.nutanix_endpoint
nutanix_port = var.nutanix_port
cluster_name = var.nutanix_cluster
nutanix_insecure = true
os_type = “Linux”
image_name = var.centos_nutanix_specific.image_name
image_delete = true
force_deregister = true
shutdown_command = “echo ‘packer’ | sudo -S shutdown -P now”
shutdown_timeout = “2m”
ssh_username = var. ssh_username
communicator = “ssh”
vm_disks {
image_type = “DISK_IMAGE”
source_image_uri = var.centos_nutanix_specific.source_image_uri
disk_size_gb = var.centos_nutanix_specific.disk_size_gb
}
vm_nics {
subnet_name = var.nutanix_subnet
}
}
build {
sources = [
“sources.nutanix.centos”
]
provisioner “shell” {
execute_command = “echo ‘packer’ | sudo -E -S bash -c ‘{{ .Vars }} {{ .Path }}’”
script = “./provisioning-scripts/centos.sh”
}
}
I am able to telnet to the temporary packer VM on port 22, however packer build is failing with ssh timeout. How do I fix this?
Thanks