Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Build Image using Azure Custom VNET, Subnet & NSG #7644

Closed
Kannancsq opened this issue May 14, 2019 · 5 comments
Closed

Unable to Build Image using Azure Custom VNET, Subnet & NSG #7644

Kannancsq opened this issue May 14, 2019 · 5 comments

Comments

@Kannancsq
Copy link

We are using Azure with Packer, and custom our VNET, Subnet and resource group for generating image instead of temporary resources by Packer.

We Created VNET, Subnet and NSG. In NSG we have enabled Internet in Inbound.

For some reason , we are not sucessfull in generating image. We tried both Windows Image and Ubuntu in both scenarios getting SSH / WinRM time out.

Attached the Script & Log file.
win_template.txt

Error from Log File
2019/05/14 19:27:13 packer.exe: 2019/05/14 19:27:13 [INFO] Waiting for SSH, up to timeout: 20m0s
2019/05/14 19:27:13 ui: ==> azure-arm: Waiting for SSH to become available...
2019/05/14 19:27:28 packer.exe: 2019/05/14 19:27:28 [DEBUG] TCP connection to SSH ip/port failed: dial tcp 10.1.0.5:22: i/o timeout

@SwampDragons
Copy link
Contributor

If you run Packer in debug mode and try to connect independently of Packer while Packer is waiting for SSH/Winrm, are you able to connect to your instances?

@akingscote
Copy link

@Kannancsq did you ever resolve this? Having something similar. If i create my image manually through the UI on the same Vnet and subnet i dont have any issues, but with packer is just says "waiting for ssh to become available".

I know azure reserves the first 4 IPs of a subnet, but it looks like its picked an IP out of the reserved range so not sure what the problem is

@akingscote
Copy link

Figured it out, i was missing the private_virtual_network_with_public_ip flag

"private_virtual_network_with_public_ip": true,
"virtual_network_subnet_name" : "packerSubnet",
"virtual_network_name" : "myTFVnet",
"virtual_network_resource_group_name" : "myTFResourceGroup",

@SwampDragons
Copy link
Contributor

Thanks for sharing @akingscote! @Kannancsq did you ever figure this issue out? If not, does the above solution also fix things for you?

@ghost
Copy link

ghost commented Apr 30, 2021

This issue has been automatically migrated to hashicorp/packer-plugin-azure#13 because it looks like an issue with that plugin. If you believe this is not an issue with the plugin, please reply to hashicorp/packer-plugin-azure#13.

@ghost ghost closed this as completed Apr 30, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants