Найти список всех образов для виртуальных машин в Azure
Когда вы строите свою инфраструктуру в облаке Azure, используя IaaC (Infrastructure as a Code) подход, иногда вам придется некоторые ваши виртуалки переразворачивать. От этого никуда не денешься, учитывая, в общем-то, специфику облака: что-то не работает? - передеплой. И вот иногда бывает так, что сталкиваешься с проблей переразвертывания, когда парни из Microsoft обновляют образы для виртуалок новыми версиями систем. Например - SQL server 2014 уже не поставляется с SP1. В итоге вам надо как-то быстро найти список новых ID для образов, чтобы обновить свои ARM или Powershell-скрипты.
Я написал небольшой скрипт, который поможет в этом.
Login-AzureRmAccount;
#Select Region
$location = (Get-AzureRmLocation).location | Out-GridView -Title "Select Azure location" -PassThru;
#Select publisher
$publisher = Get-AzureRmVMImagePublisher -Location $location | Select -ExpandProperty PublisherName | Out-GridView -Title "Select Publisher" -PassThru;
#Get all offers for selected publisher
$Alloffers = @(Get-AzureRmVMImageOffer -Location $location -Publisher $publisher | Select -ExpandProperty Offer);
#Get all images for all skus of all offers for the selected publisher
foreach ($Offer in $Alloffers)
{
$Allskus = (Get-AzureRmVMImageSku -Location $location -Publisher $publisher -Offer $offer | Select -ExpandProperty Skus);
foreach ($sku in $Allskus)
{
$Allimages += @(Get-AzureRmVMImage -Location $location -PublisherName $publisher -Offer $offer -Skus $sku);
}
}
$Allversions = $Allimages | select Version,Skus,Offer,PublisherName | Sort-Object Skus;
Write-Output $Allversions;
Вот примерный вывод:
Version Skus Offer PublisherName
------- ---- ----- -------------
11.5.65235 Enterprise SQL2012SP3-WS2012R2 MicrosoftSQLServer
11.3.65235 Enterprise SQL2012SP3-WS2012R2-BYOL MicrosoftSQLServer
11.7.65235 Enterprise SQL2012SP3-WS2012R2-BYOL MicrosoftSQLServer
12.0.44499 Enterprise SQL2014SP1-WS2012R2-BYOL MicrosoftSQLServer
12.9.50001 Enterprise SQL2014SP2-WS2012R2 MicrosoftSQLServer
12.9.50005 Enterprise SQL2014SP2-WS2012R2-BYOL MicrosoftSQLServer
13.5.31640 Enterprise SQL2016-WS2012R2 MicrosoftSQLServer
13.0.400110 Enterprise SQL2016SP1-WS2016 MicrosoftSQLServer
13.0.400110 Enterprise SQL2016SP1-WS2016-BYOL MicrosoftSQLServer
11.5.65235 Enterprise SQL2012SP3-WS2012R2 MicrosoftSQLServer
11.5.65235 Enterprise SQL2012SP3-WS2012R2 MicrosoftSQLServer
11.3.65235 Enterprise SQL2012SP3-WS2012R2-BYOL MicrosoftSQLServer
12.0.44499 Enterprise SQL2014SP1-WS2012R2-BYOL MicrosoftSQLServer
12.9.50001 Enterprise SQL2014SP2-WS2012R2 MicrosoftSQLServer
12.9.50005 Enterprise SQL2014SP2-WS2012R2-BYOL MicrosoftSQLServer
13.5.31640 Enterprise SQL2016-WS2012R2 MicrosoftSQLServer
13.0.21640 Enterprise SQL2016-WS2012R2-BYOL MicrosoftSQLServer
13.0.400110 Enterprise SQL2016SP1-WS2016 MicrosoftSQLServer
13.0.500110 Enterprise SQL2016SP1-WS2016 MicrosoftSQLServer
13.0.400110 Enterprise SQL2016SP1-WS2016-BYOL MicrosoftSQLServer
13.0.500110 Enterprise SQL2016SP1-WS2016-BYOL MicrosoftSQLServer
11.7.65235 Enterprise SQL2012SP3-WS2012R2-BYOL MicrosoftSQLServer
13.0.400110 Enterprise SQL2016SP1-WS2016-BYOL MicrosoftSQLServer
13.0.21640 Enterprise SQL2016-WS2012R2-BYOL MicrosoftSQLServer
13.0.400110 Enterprise SQL2016SP1-WS2016 MicrosoftSQLServer
12.9.50005 Enterprise SQL2014SP2-WS2012R2-BYOL MicrosoftSQLServer
13.0.21640 Enterprise SQL2016-WS2012R2-BYOL MicrosoftSQLServer
12.9.50001 Enterprise SQL2014SP2-WS2012R2 MicrosoftSQLServer
12.0.44499 Enterprise SQL2014SP1-WS2012R2-BYOL MicrosoftSQLServer
11.7.65235 Enterprise SQL2012SP3-WS2012R2-BYOL MicrosoftSQLServer
13.5.31640 Enterprise SQL2016-WS2012R2 MicrosoftSQLServer
11.3.65235 Enterprise SQL2012SP3-WS2012R2-BYOL MicrosoftSQLServer
2.0.0 Evaluation SQL2017-RHEL73 MicrosoftSQLServer
2.0.0 Evaluation SQL2017-RHEL73 MicrosoftSQLServer
2.0.0 Evaluation SQL2017-RHEL73 MicrosoftSQLServer
13.0.400111 Express SQL2016SP1-WS2016 MicrosoftSQLServer
13.0.400111 Express SQL2016SP1-WS2016 MicrosoftSQLServer
12.9.50001 Express SQL2014SP2-WS2012R2 MicrosoftSQLServer
12.9.50001 Express SQL2014SP2-WS2012R2 MicrosoftSQLServer
13.0.500110 Express SQL2016SP1-WS2016 MicrosoftSQLServer
11.5.65235 Express SQL2012SP3-WS2012R2 MicrosoftSQLServer
11.5.65235 Express SQL2012SP3-WS2012R2 MicrosoftSQLServer
12.9.50001 Express SQL2014SP2-WS2012R2 MicrosoftSQLServer
11.5.65235 Express SQL2012SP3-WS2012R2 MicrosoftSQLServer
13.0.400111 Express SQL2016SP1-WS2016 MicrosoftSQLServer
13.5.31640 SQLDEV SQL2016-WS2012R2 MicrosoftSQLServer
13.0.21640 SQLDEV SQL2016-WS2016 MicrosoftSQLServer
13.0.400111 SQLDEV SQL2016SP1-WS2016 MicrosoftSQLServer
13.0.500110 SQLDEV SQL2016SP1-WS2016 MicrosoftSQLServer
13.0.400111 SQLDEV SQL2016SP1-WS2016 MicrosoftSQLServer
13.0.21640 SQLDEV SQL2016-WS2016 MicrosoftSQLServer
13.0.21640 SQLDEV SQL2016-WS2016 MicrosoftSQLServer
13.0.400111 SQLDEV SQL2016SP1-WS2016 MicrosoftSQLServer
13.5.31640 SQLDEV SQL2016-WS2012R2 MicrosoftSQLServer
13.5.31640 SQLDEV SQL2016-WS2012R2 MicrosoftSQLServer
13.0.500110 Standard SQL2016SP1-WS2016 MicrosoftSQLServer
12.9.50001 Standard SQL2014SP2-WS2012R2 MicrosoftSQLServer
13.0.400110 Standard SQL2016SP1-WS2016-BYOL MicrosoftSQLServer
11.5.65236 Standard SQL2012SP3-WS2012R2 MicrosoftSQLServer
13.0.21640 Standard SQL2016-WS2012R2-BYOL MicrosoftSQLServer
11.5.65236 Standard SQL2012SP3-WS2012R2 MicrosoftSQLServer
13.0.400110 Standard SQL2016SP1-WS2016-BYOL MicrosoftSQLServer
11.7.65236 Standard SQL2012SP3-WS2012R2-BYOL MicrosoftSQLServer
12.7.50005 Standard SQL2014SP2-WS2012R2-BYOL MicrosoftSQLServer
13.0.400110 Standard SQL2016SP1-WS2016 MicrosoftSQLServer
12.7.50005 Standard SQL2014SP2-WS2012R2-BYOL MicrosoftSQLServer
12.0.444999 Standard SQL2014SP1-WS2012R2-BYOL MicrosoftSQLServer
13.0.500110 Standard SQL2016SP1-WS2016-BYOL MicrosoftSQLServer
13.0.21640 Standard SQL2016-WS2012R2-BYOL MicrosoftSQLServer
12.7.50005 Standard SQL2014SP2-WS2012R2-BYOL MicrosoftSQLServer
12.9.50001 Standard SQL2014SP2-WS2012R2 MicrosoftSQLServer
13.0.400110 Standard SQL2016SP1-WS2016 MicrosoftSQLServer
13.0.400110 Standard SQL2016SP1-WS2016-BYOL MicrosoftSQLServer
12.0.444999 Standard SQL2014SP1-WS2012R2-BYOL MicrosoftSQLServer
13.0.400110 Standard SQL2016SP1-WS2016 MicrosoftSQLServer
12.0.444999 Standard SQL2014SP1-WS2012R2-BYOL MicrosoftSQLServer
12.9.50001 Standard SQL2014SP2-WS2012R2 MicrosoftSQLServer
13.0.21640 Standard SQL2016-WS2012R2-BYOL MicrosoftSQLServer
11.7.65236 Standard SQL2012SP3-WS2012R2-BYOL MicrosoftSQLServer
11.7.65236 Standard SQL2012SP3-WS2012R2-BYOL MicrosoftSQLServer
11.5.65236 Standard SQL2012SP3-WS2012R2 MicrosoftSQLServer
12.9.50001 Web SQL2014SP2-WS2012R2 MicrosoftSQLServer
12.5.50000 Web SQL2012SP3-WS2012R2 MicrosoftSQLServer
12.5.50000 Web SQL2012SP3-WS2012R2 MicrosoftSQLServer
13.0.400110 Web SQL2016SP1-WS2016 MicrosoftSQLServer
12.5.50000 Web SQL2012SP3-WS2012R2 MicrosoftSQLServer
13.0.400110 Web SQL2016SP1-WS2016 MicrosoftSQLServer
13.0.500110 Web SQL2016SP1-WS2016 MicrosoftSQLServer
12.9.50001 Web SQL2014SP2-WS2012R2 MicrosoftSQLServer
12.9.50001 Web SQL2014SP2-WS2012R2 MicrosoftSQLServer
13.0.400110 Web SQL2016SP1-WS2016 MicrosoftSQLServer
powershell (ru), скрипт, azure (ru)
- Просмотров: 3129