Azure-chroot usage help

I’m trying to use the packer example for azure-chroot.

https://raw.githubusercontent.com/hashicorp/packer/master/builder/azure/examples/debian-chroot.json

I’m hitting this error on packer build:

* unable to render temporary disk id: template: root:1:18: executing "root" at
<vm `subscription_id`>: error calling vm: Get
"http://169.254.169.254/metadata/instance?api-version=2017-08-01": dial tcp
169.254.169.254:80: i/o timeout

Maybe I’m not using this builder correctly…

Do I need to install packer on an existing Azure VM and run packer build from there with the azure-chroot json?

Or do I run packer locally on my desktop and connect to an existing Azure VM?

@deasunk
did you figure out the issue?

I am getting the below even when using the sample you mentioned

  • unable to render temporary disk id: template: root:1: function “vm” not defined
  • unable to render temporary snapshot id: template: root:1: function “vm” not defined
  • unable to render temporary data disk id prefix: template: root:1: function “vm” not defined
  • unable to render temporary data disk snapshot id prefix: template: root:1: function “vm” not defined