THANK YOU all for your contributions, community spirit and enthusiasm. I've enjoyed building this repo and working with you all here. As the repo has been migrated, this repo is archived,
Get started now, this repo contains mutliple examples and test templates for Azure VM Image Builder (Public Preview).
What is Image Builder?? Get started with the short intro video below, or go straight to the Quick Starts below.
Quick QuickStarts Examples. You can run these immediately using the Azure CloudShell from the Portal, and see multiple scenarios that the VM Image Builder supports.
Azure Resource Manager (ARM) Image Builder Examples. The beauty of these examples, they are heavily parameterized, so you just need to drop in your own details, then begin image building, or integrate them to existing pipelines.
Release Date : 1st June 0900 PST
2020-02-14
, containing:
Details below..
2019-05-01-preview
will not be run, and not supported.2020-02-14
API requires:
subnetId
, this is the resourceID of the subnet.2020-02-14
!These details are being added to Azure docs and examples now, but for those who want a sneak peak...
"galleryImageId": "/subscriptions/<subscriptionID>/resourceGroups/<rgName>/providers/Microsoft.Compute/galleries/<sharedImageGalName>/images/<imageDefName>/versions/1.1.1"
}
For more information on these options, see SIG documentation
A complete example, showing all the properties:
{
"type": "SharedImage",
"galleryImageId": "/subscriptions/<subscriptionID>/resourceGroups/<rgName>/providers/Microsoft.Compute/galleries/<sharedImageGalName>/images/<imageDefName>/versions/1.1.1",
"runOutputName": "<runOutputName>",
"artifactTags": {
"source": "azureVmImageBuilder",
"baseosimg": "windows2019"
},
"replicationRegions": [
"<region1>",
"<region2>"
],
"storageAccountType" : "Standard_ZRS",
"excludeFromLatest" : true
}
Specify paid Market Place Offerings as a source:
"source": {
"type": "PlatformImage",
"publisher": "RedHat",
"offer": "rhel-byos",
"sku": "rhel-lvm75",
"version": "7.5.20190620",
"planInfo": {
"planName": "rhel-lvm75",
"planProduct": "rhel-byos",
"planPublisher": "redhat"
}
If you are running an image build that you believe is incorrect, waiting for user input, or you feel will never complete successfully, then you can cancel the build.
The build can only be cancelled any time, if the distribution phase has started you can cancel, but you will need to clean up any created images. The cancel command does not wait for cancel to complete, please monitor lastrunstatus.runstate
for canceling progress, using these status commands.
Examples of cancel
commands:
Invoke-AzResourceAction -ResourceName $imageTemplateName -ResourceGroupName $imageResourceGroup -ResourceType Microsoft.VirtualMachineImages/imageTemplates -ApiVersion >> API "2019-05-01-preview" -Action Cancel -Force
az resource invoke-action \
--resource-group $imageResourceGroup \
--resource-type Microsoft.VirtualMachineImages/imageTemplates \
-n helloImageTemplateLinux01 \
--action Cancel
We are making key changes to Azure Image Builder security model, this will be a breaking change, therefore we require you to take these before 26th May 0700 Pacific Time.
The change - Azure Image Builder Templates (AIB) must contain a populated identity
property, and the user assigned identity must have permissions to read and write images.
Impact - From the 26th May 0700 we will not accepting any new AIB Templates or process existing AIB Templates that do not contain a populated identity
. This also means any templates being submitted with api versions earlier than 2019-05-01-preview
will not be be accepted either.
Why? - As well as allow us to prepare for future features, we are simplifying and improving the AIB security model, so instead of you granting permissions the AIB Service Principal Name, to build and distribute custom images, and then a user identity to you will now use a single user identity to get access to other Azure resources.
identity
property.For full details and the next potential breaking change, please review the May Service Update document.
If you have any questions, please review the above and FAQs, and if you cannot find them, please raise questions on GitHub issues.
Thanks,
As you may have noticed, we have now made identity
a mandatory parameter in the template, this has multiple advantages, as described above, but this was also needed in preparation for our new API release, 2020-02-14
, that will be available in all regions on the 27th May, by 0700 Pacific.
We are in the process of updating all the documentation, new features, and end to end examples, but the main breaking changes are:
identity
is a mandatory requirement, please review the May Service Update document, on how to add this to your templates.vnetConfig
- this specification is changing, from providing, name, subnetName, resourceGroupName to just subnetId
, for example: "vnetConfig": {
"subnetId": "/subscriptions/<subscriptionID>/resourceGroups/<vnetRgName>/providers/Microsoft.Network/virtualNetworks/<vnetName>/subnets/<subnetName>"
}
}
If you create a new AIB template, and do not specify the API version in the calling client like below, then the template will be created using the new API version. This is because the calling client API version will override whatever exists in the AIB template.
az resource create \
--resource-group $imageResourceGroup \
--properties @existingVNETLinux.json \
--is-full-object \
--resource-type Microsoft.VirtualMachineImages/imageTemplates \
-n existingVNETLinuxTemplate01
If you specify the API version using the calling client, like below, this will be created using the specified API version:
New-AzResourceGroupDeployment -ResourceGroupName $imageResourceGroup -TemplateFile $templateFilePath -api-version "2019-05-01-preview" -imageTemplateName $imageTemplateName -svclocation $location
Once the new API is released, calling clients will default to use the new API version. Therefore, if you have existing templates that were created using the previous API version 2019-05-01-preview
, in order to run, view properties, or delete them, you will need to specify the API version in the calling client, for example:
Getting the template status AZ CLI:
az resource show \
--resource-group <imageTemplateResourceGroup> \
--resource-type Microsoft.VirtualMachineImages/imageTemplates \
--api-version 2019-05-01-preview
-n <imageTemplateName>
Getting the template status PowerShell:
If you use the current documented method, then ensure the API version matches the previous API version 2019-05-01-preview
.
$urlBuildStatus = [System.String]::Format("{0}subscriptions/{1}/resourceGroups/$imageResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/{2}?api-version=2019-05-01-preview", $managementEp, $currentAzureContext.Subscription.Id,$imageTemplateName)
Deleting Templates AZ CLI:
az resource delete \
--resource-group <imageTemplateResourceGroup> \
--resource-type Microsoft.VirtualMachineImages/imageTemplates \
--api-version 2019-05-01-preview
-n <imageTemplateName>
Deleting Templates PowerShell:
Remove-AzResource -ResourceId $resTemplateId.ResourceId -Force -ApiVersion "2019-05-01-preview"
What about the AIB Azure DevOps? - The DevOps task is hard coded to use an API version, this will be updated, but continue to work without interuption.
When will we announce the new functionality? - The new features will be documented by 28th May
Can I use existing documentation? - Yes, examples that have breaking changes will be updated.
It has been a busy year already, and we are so pleased to announce this new functionality:
The offical Microsoft docs for image builder will be updated this month to relect these updates.
The work never ends, latest customization support:
There will be more updates in January! On behalf of the team, thank you to everyone who has tried Image Builder, and given feedback, we really appreciate it. Happy Holidays!!!!
We constantly update the Image Builder Service, and its been a while since we summarized recent updates here:
PowerShell Customizer Elevated Permissions
Windows Client / Virtual Desktop OS Support
Supportability
Shared Image Gallery Version Modifications
PowerShell examples
Release Date : 10th May 1000 PST This is an exciting release, image builder has just PUBLIC PREVIEW!!!!!
The whole team is excited to make this milestone, and thanks the Private preview community for their engagement, feedback, and helping shape the product.
You will be glad to know there are no API changes this month! But just wanted to share with you an exciting feature additions:
Preview Azure DevOps Extension - This simplfies using Image Builder in Azure DevOps release pipelines, you just fill in Source / Customizations / Distribute, then the task will create the image, it also will copy in you Build pipeline artifacts!!!
It is so cool, please try it, and give us feedback.
The quickstarts are in the process of bring migrated to Azure Docs, but the quick starts will be maintained until there is a full transition, and you will be notified.
Features added (links to example config templates):
Features added (links to example config templates):