Sample Header Ad - 728x90

Centos8 image creation through packer on azure results in to errors

0 votes
0 answers
218 views
Can somebody tell me what I am doing wrong here as I am unable to create the image? actually the commands, when I run on my host Centos machine, works fine but when I execute the same commands through packer result into error. JSON file: { "builders": [{ "type": "azure-arm", "client_id": "{{user azure-client-id}}", "client_secret": "{{user azure-client-secret}}", "tenant_id": "{{user azure-tenant-id}}", "subscription_id": "{{user azure-subscription-id}}", "managed_image_resource_group_name": "{{user azure-resource-group}}", "managed_image_name": "CentOS8-Packer", "os_type": "Linux", "image_publisher": "OpenLogic", "image_offer": "CentOS", "image_sku": "8_2-gen2", "location": "{{user azure-region}}", "vm_size": "{{user vm-size}}" }], "provisioners": [ { "execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'", "script":"ami-script.sh" "type": "shell" } ] } ami-script.sh content: #!/bin/bash -e dnf update -y dnf install terminator xrdp -y Error: Updated part: dnf update -y error: enter image description here enter image description here dnf install terminator xrdp error (resolved) enter image description here
Asked by zuri_nahk (13 rep)
Aug 27, 2020, 07:35 PM
Last activity: Aug 27, 2020, 09:41 PM