Azure에서 패커를 통해 Centos8 이미지를 생성하면 오류가 발생함

Azure에서 패커를 통해 Centos8 이미지를 생성하면 오류가 발생함

이미지를 만들 수 없기 때문에 여기서 내가 뭘 잘못하고 있는지 말해 줄 수 있나요? 실제로 이 명령을 Centos 호스트에서 실행하면 제대로 작동하지만 패키저를 통해 동일한 명령을 실행하면 오류가 발생합니다.

JSON 파일:

{
  "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 내용:

#!/bin/bash -e
dnf update -y
dnf install terminator xrdp -y

오류: 업데이트 섹션:

dnf update -y실수:

여기에 이미지 설명을 입력하세요. 여기에 이미지 설명을 입력하세요. dnf 설치 종료자 xrdp 오류(해결됨) 여기에 이미지 설명을 입력하세요.

관련 정보