Created
September 28, 2023 23:13
-
-
Save jsturtevant/8aca7a7335664d4fac277f1a2f192527 to your computer and use it in GitHub Desktop.
upload a vhd to a sig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$location="eastus" | |
$galleryName="SigWinTestingImages" | |
$resourceGroup="annual-channel" | |
$imageDefinition="capi-windows-annual" | |
$publisher="sigwincapi" | |
$offer="annualChannel" | |
$sku="original" | |
$storageAccountName="sigwin" | |
$subscription="" | |
$storageContainer="annualchvhd" | |
az storage account create ` | |
--name $storageAccountName ` | |
--resource-group $resourceGroup ` | |
--location $location ` | |
--sku Standard_LRS ` | |
--encryption-services blob | |
az storage container create ` | |
--account-name $storageAccountName ` | |
--name $storageContainer ` | |
--auth-mode login | |
az storage blob upload ` | |
--account-name $storageAccountName ` | |
--container-name $storageContainer ` | |
--name 23H2_25951.vhd ` | |
--file 23H2_25951.vhd ` | |
--auth-mode login | |
az sig create --resource-group $resourceGroup --gallery-name $galleryName | |
az sig image-definition create ` | |
--resource-group $resourceGroup ` | |
--gallery-name $galleryName ` | |
--gallery-image-definition $imageDefinition ` | |
--publisher $publisher ` | |
--offer $offer ` | |
--sku $sku ` | |
--os-type Windows ` | |
--os-state generalized | |
az sig image-version create --resource-group $resourceGroup ` | |
--gallery-name $galleryName --gallery-image-definition $imageDefinition ` | |
--gallery-image-version 1.0.0 ` | |
--os-vhd-storage-account "/subscriptions/$subscription/resourceGroups/$resourceGroup/providers/Microsoft.Storage/storageAccounts/$storageAccountName" ` | |
--os-vhd-uri "https://$storageAccountName.blob.core.windows.net/$storageContainer/23H2_25951.vhd" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/thecloudtaylor/c6b551f24c198ebdaba6d8eca429bae8