Packer failed for variable disk_additional_size

2020-07-23T21:43:02.9341372Z e[1;32m==> azure-arm: ERROR: -> BadRequest : The source resource disk ‘data disk Lun=0’ is too big: size=‘2048’. The maximum disk size allowed is ‘1024’.
2020-07-23T21:43:02.9342709Z ==> azure-arm:e[0m
2020-07-23T21:43:02.9344815Z e[1;31m==> azure-arm: Code=“BadRequest” Message="The source resource disk ‘data disk Lun=0’ is too big: size=‘2048’. The maximum disk size allowed is ‘1024’."e[0m
2020-07-23T21:43:02.9347867Z e[1;32m==> azure-arm: Provisioning step had errors: Running the cleanup provisioner, if present…e[0m
2020-07-23T21:43:02.9358380Z e[1;32m==> azure-arm: Removing the created Deployment object: 'pkrdpyuhfknbhk2’e[0m
2020-07-23T21:43:18.1428711Z e[1;32m==> azure-arm:
2020-07-23T21:43:18.1429266Z ==> azure-arm: Cleanup requested, deleting resource group …e[0m
2020-07-23T21:43:18.4547546Z e[1;32m==> azure-arm:
2020-07-23T21:43:18.4548134Z ==> azure-arm: Not waiting for Resource Group delete as requested by user. Resource Group Name is pkr-Resource-Group-yuhfknbhk2e[0m
2020-07-23T21:43:18.4548743Z e[1;31mBuild ‘azure-arm’ errored: Code=“BadRequest” Message="The source resource disk ‘data disk Lun=0’ is too big: size=‘2048’. The maximum disk size allowed is ‘1024’."e[0m
2020-07-23T21:43:18.4551263Z
2020-07-23T21:43:18.4551777Z ==> Some builds didn’t complete successfully and had errors:
2020-07-23T21:43:18.4557925Z --> azure-arm: Code=“BadRequest” Message=“The source resource disk ‘data disk Lun=0’ is too big: size=‘2048’. The maximum disk size allowed is ‘1024’.”
2020-07-23T21:43:18.4558076Z
2020-07-23T21:43:18.4558192Z ==> Builds finished but no artifacts were created.
2020-07-23T21:43:18.6043391Z ##[debug]Exit code 1 received from tool ‘/bin/bash’
2020-07-23T21:43:18.6056921Z ##[debug]STDIO streams have closed for tool ‘/bin/bash’
2020-07-23T21:43:18.6087677Z ##[debug]task result: Failed
2020-07-23T21:43:18.6183590Z ##[error]Script failed with exit code: 1
2020-07-23T21:43:18.6194630Z ##[debug]Processed: ##vso[task.issue type=error;]Script failed with exit code: 1
2020-07-23T21:43:18.6195469Z ##[debug]Processed: ##vso[task.complete result=Failed;]Script failed with exit code: 1

Hi, what’s the question here? Looks like you got a pretty clear API response from Azure that the max disk size is 1024.

Hi, I should able to attach 2048 GB but it accepts only 1024 size

Azure says no. 1024 GB is the limit.

I should be able to ad 2048 GB disk

This error message is coming from Azure, not from Packer. If you want to be able to attach a 2048 GB disk, I think you’ll have to open an issue with Microsoft.