-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure-chroot has issues with detecting environment information. Error is 'function "vm" not defined' #87
Comments
I have met the same issue, anyone have solution about it ? |
I'm having this problem too, tried a few things and nothing helped. |
the post also gives you work around. Add the below lines and it should fix it
|
Is there any answer to this issue? |
I have the same problem. |
Hey all, this was fixed in #396, this error should no longer appear, and you shouldn't have to set those temporary values manually anymore, however the |
This issue was originally opened by @arvindn05 as hashicorp/packer#10985. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Overview of the Issue
Unable to run azure-chroot builder using the instructions from the documentation.
Getting the error
* unable to render temporary disk id: template: root:1: function "vm" not defined
Looking at the code, looks like a "vm" function is being defined and it uses Azure metadata endpoint to retrive the information required. But it does not seem to be functioning.
https://github.com/hashicorp/packer/blob/master/builder/azure/chroot/builder.go#L154
Reproduction Steps
Take the below packer file and run it on an azure VM. Just running validate is good enough to repro the problem.
The packer file is taken almost as is from https://www.packer.io/docs/builders/azure/chroot#using-a-service-principal
Uncommenting the commented section allows it to run without issues....but they are not required fields and they need to be autopopulated per the documentation.
Packer version
2021/05/01 01:17:22 [INFO] Packer version: 1.7.2 [go1.16.3 linux amd64]
Simplified Packer Buildfile
Operating system and Environment details
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-1160.15.2.el7.x86_64
Architecture: x86-64
Log Fragments and crash.log files
The text was updated successfully, but these errors were encountered: