Azure-docs: SKU, Offer, Publisher details not visible

Created on 27 Nov 2018  Â·  18Comments  Â·  Source: MicrosoftDocs/azure-docs

When creating VMs from an image published in the gallery and querying the source image for that VM, we only get the resource ID of the published image and not the SKU, Offer and Publisher details (they appear blank in comparison to creating a VM straight from a custom managed image).

That raises a false positive alarm on our compliance monitoring tool, as the image from which the VMs are created show as non compliant, due to the above details not showing up.

Is it something that can be remediated?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 cxp product-question triaged virtual-machine-windowsvc

All 18 comments

Thanks for the feedback! We are currently investigating and will update you shortly.

@panoschatz Can you please share which gallery image are you using and how are you querying the source VM for the information, basically if you can share the steps you took, we would be able to help you better. Thanks :)

@Karishma-Tiwari-MSFT Querying a VM built from the Azure Gallery using SQL2016SP2-WS2016-BYOL gives the below:

$VM = Get-AzureRMVM -Name <vmname1> -ResourceGroupName <rgname>
$VM.StorageProfile.ImageReference

Publisher : MicrosoftSQLServer
Offer     : SQL2016SP2-WS2016-BYOL
Sku       : Standard
Version   : 13.2.181009
Id        : 

We customised that image and published it in our private image gallery. Then querying the VM created from the private image gallery:

$VM = Get-AzureRMVM -Name <vmname2> -ResourceGroupName <rgname>
$VM.StorageProfile.ImageReference

Publisher : 
Offer     : 
Sku       : 
Version   : 
Id        : /subscriptions/<subid>/resourceGroups/<rgname>/providers/Microsoft.Compute/galleries/<private gallery name>/images/<OurCustom_SQL2016SP2-WS2016-BYOL>/1.0.0 

As mentioned above, the details of the base image are blank and that triggers an alert, as we don't allow images that do not come from the Azure gallery in the first place.

Thanks @panoschatz

Did you set the publisher/offer/sku while creating the image definition?

Hi @axayjo - Yes I did.

@axayjo Would you or someone from your team be able to help out the customer with this issue?
Thanks :)

@panoschatz, this is the expected behavior. Get-AzureRMVM will return the image reference that you used to create the VM. If you used pub/offer/sku to reference the image while creating the VM, it'll return the pub/offer/sku triplet and if you used the image id to reference the image while creating the VM, it'll return the image id. It's one or the other. And, right now, shared image gallery images can't be referenced using pub/offer/sku.

Thanks @axayjo. In that case we 'd be able to query the published image version details, however the Powershell cmdlets for the Shared Gallery are not yet available (correct me if i'm wrong), so only option is CLI and try to format output. Any ideas on when the PS ones are being released or whether it is planned to reference shared images using pub/offer/sku in the future?

@axayjo Would you be able to help answer the roadmap question asked by the customer in the comment above. Thanks.

@panoschatz, PowerShell cmdlets for Shared Image Gallery were released a month ago starting from 5.7.2. Here's the link - https://www.powershellgallery.com/packages/AzureRM.Compute/5.7.2.

@axayjo - It would be good though if there was some documentation around those cmdlets, unless I've missed it?
The only documentation on how to interact with a Shared Gallery refers to AZ CLI or ARM Templates:
https://docs.microsoft.com/en-us/azure/virtual-machines/linux/shared-images
https://github.com/arsenvlad/azure-shared-image-gallery-replicacount

@panoschatz, We're currently working on the documentation and should have it ready soon.

@axayjo Thanks. @panoschatz As shared above, the document will be ready soon. Thank you for bringing this to our attention. We will now close this issue. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion. :)

@Karishma-Tiwari-MSFT , Any further update on this thread. I know this thread is very old and not sure this is still monitored. We are also having our own image and in the same situation. It would great if you guys can assist us to get the sku details. Thanks you!

@axayjo Can you please share if there is any update on this or shared image gallery images still can't be referenced using pub/offer/sku? Thanks :)

The behavior is still the same, as confirmed by the product team. This feature is on the roadmap, I will share details on the timeline as soon as I get an update.

Subscribed, also interested in when pub/offer/sku will be queryable

@Karishma-Tiwari-MSFT Is there any update on this feature? Any ETA you can share?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JeffLoo-ong picture JeffLoo-ong  Â·  3Comments

monteledwards picture monteledwards  Â·  3Comments

Ponant picture Ponant  Â·  3Comments

Agazoth picture Agazoth  Â·  3Comments

jharbieh picture jharbieh  Â·  3Comments