How to set the Virtual Machine name using Azure Image Builder?
-
According to https://docs.microsoft.com/en-us/azure/virtual-machines/linux/image-builder manual one can build an image on Azure using Azure Image Builder. When running the first example, the following error is shown in the customization log:
PACKER ERR ==> azure-arm: ERROR: -> RequestDisallowedByPolicy : Resource '1f43d6s8hd4fr5e' was disallowed by policy "Virtual Machine Naming Policy"
The question is how to set the Virtual Machine image name using Azure Image Builder.
Attempts to solve the issue
- Asked the team that is responsible for the policy to remove are change the Virtual Machine Naming Policy
- Tried to change the VM image name by modifying some keys in the json file.
- Created the following GitHub https://github.com/Azure/azvmimagebuilder/issues/28 .
-
Use the following configuration key:
. . "temp_compute_name": "", . .
Note: Try to keep name short.