github.com/kikitux/packer@v0.10.1-0.20160322154024-6237df566f9f/website/source/docs/builders/azure.html.md (about) 1 --- 2 description: | 3 4 layout: docs 5 page_title: Azure Resource Manager 6 ... 7 8 # Azure Resource Manager Builder 9 10 Type: `azure-arm` 11 12 Packer supports building VHDs in [Azure Resource Manager](https://azure.microsoft.com/en-us/documentation/articles/resource-group-overview/). Azure provides new users a [$200 credit for the first 30 days](https://azure.microsoft.com/en-us/free/); after which you will incur costs for VMs built and stored using Packer. 13 14 Unlike most Packer builders, the artifact produced by the ARM builder is a VHD (virtual hard disk), not a full virtual machine image. This means you will need to [perform some additional steps](https://github.com/Azure/packer-azure/issues/201) in order to launch a VM from your build artifact. 15 16 Azure uses a combination of OAuth and Active Directory to authorize requests to the ARM API. Learn how to [authorize access to ARM](/docs/builders/azure-setup.html). 17 18 The documentation below references command output from the [Azure CLI](https://azure.microsoft.com/en-us/documentation/articles/xplat-cli-install/). 19 20 -> At this time packer supports building Linux virtual machines in Azure. Support for building Windows VMs is in progress and will be added in an upcoming release. 21 22 ## Configuration Reference 23 24 The following configuration options are available for building Azure images. In addition to the options listed here, a 25 [communicator](/docs/templates/communicator.html) can be configured for this 26 builder. 27 28 ### Required: 29 30 - `client_id` (string) The Active Directory service principal associated with your builder. 31 32 - `client_secret` (string) The password or secret for your service principal. 33 34 - `resource_group_name` (string) Resource group under which the final artifact will be stored. 35 36 - `storage_account` (string) Storage account under which the final artifact will be stored. 37 38 - `subscription_id` (string) Subscription under which the build will be performed. **The service principal specified in `client_id` must have full access to this subscription.** 39 40 - `tenant_id` (string) The account identifier with which your `client_id` and `subscription_id` are associated. 41 42 - `capture_container_name` (string) Destination container name. Essentially the "folder" where your VHD will be organized in Azure. 43 44 - `capture_name_prefix` (string) VHD prefix. The final artifacts will be named `PREFIX-osDisk.UUID` and `PREFIX-vmTemplate.UUID`. 45 46 - `image_publisher` (string) PublisherName for your base image. See [documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/) for details. 47 48 CLI example `azure vm image list-publishers -l westus` 49 50 - `image_offer` (string) Offer for your base image. See [documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/) for details. 51 52 CLI example `azure vm image list-offers -l westus -p Canonical` 53 54 - `image_sku` (string) SKU for your base image. See [documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/) for details. 55 56 CLI example `azure vm image list-skus -l westus -p Canonical -o UbuntuServer` 57 58 - `location` (string) Azure datacenter in which your VM will build. 59 60 CLI example `azure location list` 61 62 - `vm_size` (string) Size of the VM used for building. This can be changed when you deploy a VM from your VHD. See [pricing](https://azure.microsoft.com/en-us/pricing/details/virtual-machines/) information. 63 64 CLI example `azure vm sizes -l westus` 65 66 ## Basic Example 67 68 Here is a basic example for Azure. 69 70 ``` {.javascript} 71 { 72 "type": "azure-arm", 73 74 "client_id": "fe354398-d7sf-4dc9-87fd-c432cd8a7e09", 75 "client_secret": "keepitsecret&#*$", 76 "resource_group_name": "packerdemo", 77 "storage_account": "virtualmachines", 78 "subscription_id": "44cae533-4247-4093-42cf-897ded6e7823", 79 "tenant_id": "de39842a-caba-497e-a798-7896aea43218", 80 81 "capture_container_name": "images", 82 "capture_name_prefix": "packer", 83 84 "image_publisher": "Canonical", 85 "image_offer": "UbuntuServer", 86 "image_sku": "14.04.3-LTS", 87 88 "location": "West US", 89 "vm_size": "Standard_A2" 90 } 91 ``` 92 93 See the [examples/azure](https://github.com/mitchellh/packer/tree/master/examples/azure) folder in the packer project for more examples.