Problem: When creating a Foreman Azure Image from an Azure custom image in a Gallery I get ‘could not be found’. When creating a custom image that was not in a Gallery it works.
Expected outcome: The custom image from gallery should be found.
Foreman and Proxy versions:
foreman-3.16.2-1.el9
Foreman and Proxy plugin versions:
rubygem-ms_rest_azure-0.12.0-1.el9.noarch
rubygem-azure_mgmt_compute-0.22.0-1.el9.noarch
rubygem-azure_mgmt_network-0.26.1-1.el9.noarch
rubygem-azure_mgmt_resources-0.18.2-1.el9.noarch
rubygem-azure_mgmt_storage-0.23.0-1.el9.noarch
rubygem-azure_mgmt_subscriptions-0.18.5-1.el9.noarch
rubygem-foreman_azure_rm-3.0.4-1.fm3_16.el9.noarch
Distribution and version: Rocky Linux 9.7
Other relevant data:
JSON from individual Images:
This one works in Foreman:
:azvm-test → custom://azvm-test
…
“name”: “azvm-test”,
“type”: “microsoft.compute/images”,
…
This one does not works in Foreman:
:Compute_V1.4 (azVMimages/Compute_V1.4) → gallery://94.26.01070221
…
“name”: “94.26.01070221”,
“type”: “microsoft.compute/galleries/images/versions”,
…
Found the answer:
gallery://azVMimages/Compute_V1.4/94.26.01070221
1 Like
Hi @emanners
This seems to be part of the docs already in Adding Microsoft Azure Resource Manager images to Foreman server by using Foreman web UI. If this does not suffice from your perspective, please open an upstream issue in foreman-documentation.
Maximillan,
Thanks. I got past the part where I needed to find the proper path name for Shared Images.
Maximillan,
Thanks. I got past the part where I needed to find the proper path name for Shared Images. SO the image now shows up.
Now when I try to build an actual VM with that image I get the following error, based on the fact that the image was created from another Shared Gallery Image:
Failed to create a compute Azure RM (Azure Resource Manager) instance azrm-test.az.test.com: { “message”: “MsRestAzure::AzureOperationError: InvalidParameter: The value of parameter imageReference.publisher is invalid.”
Based on previous experience building this VM manually the error makes sense. When using a non-free image this is expected behavior. However I’m looking for how the Foreman build process for Azure RM expects these parameters to be provided.
Of course I tried to add that parameter to the ‘Parameters’ tab an dit didn’t help, not that I thought that it would.