hashicorp / hashicorp/packer-plugin-azure

Packer vm password gets changed

Open
#208 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
63
Forks
103
PR merge metrics
No merged PRs in 30d

Description

Hi Team, I’m trying to build resource via packer builders “type”: “azure-arm”, and what is happening that using ssh_password, the existing user password is getting changed and later am unable to ssh into that machine using the same ssh_password which I passed in config. Although ssh_username sets the username but it seems password is generated randomly or getting changed automatically. So, Is it the expected behavior or I am missing something. Please help or consult. Below is the builder section for reference

“builders”: [
{
“type”: “azure-arm”,
“use_azure_cli_auth”: “True”,
“os_type”: “Linux”,

"shared_image_gallery": {
"subscription": "{{user `subscription_id`}}",
"resource_group": "{{user `sig_gallery_resource_group`}}",
"gallery_name": "{{user `sig_gallery_name`}}",
"image_name": "{{user `sig_image_name`}}",
"image_version": "{{user `sig_source_image_version`}}"
},

"shared_image_gallery_destination": {
"subscription": "{{user `subscription_id`}}",
"resource_group": "{{user `sig_gallery_resource_group`}}",
"gallery_name": "{{user `sig_gallery_name`}}",
"image_name": "{{user `sig_image_name`}}",
"image_version": "{{user `sig_dest_image_version`}}",
"replication_regions": ["{{user `location`}}"]
},

"temp_resource_group_name": "{{user `temp_resource_group_name`}}",
"temp_compute_name": "{{user `temp_compute_name`}}",
"virtual_network_name": "SFP-COMMON-VNet",
"virtual_network_subnet_name": "SFP-COMMON-subnet",
"virtual_network_resource_group_name": "SFP-COMMON-resourceGroup",
"private_virtual_network_with_public_ip": true,
"polling_duration_timeout": "0h30m0s",

"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"ssh_pty": "true",

"location": "{{user `location`}}",
"vm_size": "{{user `vm_size`}}",
"managed_image_name": "{{user `managed_image_name`}}",
"managed_image_resource_group_name": "{{user `sig_gallery_resource_group`}}",


"shared_image_gallery_timeout": "2h5m2s",
"azure_tags": {
"packer": "true"
}

}

],

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported azure-arm builder configuration with ssh_username and ssh_password, then trace the Azure builder's SSH connection and temporary VM password handling. The issue names no repository files or tests, so confirm whether the supplied password is expected to remain usable and document or fix the observed behavior accordingly.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.