I have created a ubuntu image by following code
{
"builders": [{
"type": "azure-arm",
"subscription_id": "XXXXXX",XXXXXXXX
"client_id": "XXXXXXX",
"client_secret": "06XXXXXXX",
"tenant_id": "41X",XXXXXX
"managed_image_resource_group_name": "myResourceGroup",
"managed_image_name": "myubuntuPackerImage1234",
"os_type": "Linux",
"image_publisher": "Canonical",
"image_offer": "UbuntuServer",
"image_sku": "16.04-LTS",
"location": "East US",
"vm_size": "Standard_DS2_v2"
}],
"provisioners": [{
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'",
"inline": [
"apt-get update",
"apt-get upgrade -y",
"apt-get -y install nginx",
"/usr/sbin/waagent -force -deprovision+user && export HISTSIZE=0 && sync"
],
"inline_shebang": "/bin/sh -x",
"type": "shell"
}]
}
packer build ubuntu.json
it will build successfully and output will be
OSType: Linux
ManagedImageResourceGroupName: myResourceGroup
ManagedImageName: packerimagewin2019up
ManagedImageId: /subscriptions/XXXXXXXXXX/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myubuntuPackerImage1234
ManagedImageLocation: eastus
I found one PR - https://github.com/hashicorp/packer/issues/3785 but in case of manage disk how will get url ?
if i run az image list
it will not show you .vdf blob url how can i use above output to create new update on existing image myubuntuPackerImage1234 ?