You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have problem when creating VM in resource group from image gallery in another resource group.
Steps to reproduce:
create new compute resource
create image in compute resource
Image UUID: gallery://PUBX-RHEL-8 (which is created in azure resource group rg-azeun-X)
create VM in resource group rg-azeun-X (which is the same as resource group of image gallery) => everything works fine and VM is created.
createVM is in another resource group than resource group of image gallery => VM creation failed with error: "Failed to create a compute XY (Azure Resource Manager) instance app01-test-rhel8-d.azure.pubx: \"message\": \"MsRestAzure::AzureOperationError: InvalidParameter: The value of parameter imageReference.publisher is invalid."
IMHO problem is that image_reference is fetched from VM resource group name and not from original resource group name which is image belongs to.
Changing of rg_name to fixed string with original resource group name 'rg-azeun-X' in file managed_vm.rb on line 87 (in function define_image()) helps and VM is created successfully.
we're also running into this issue.
The same issue also exists with custom:// images.
Maybe the image id should be stored in the database when defining it,
instead of trying to rebuild it every time the image is used by foreman ?
Furthermore Azure compute galleries (gallery:// images) can optionally be shared across tenants and subscriptions
and can even be made public (Currently in preview; see here)
so I think storing the image id in the database might be the only solution ?
Hi,
We have problem when creating VM in resource group from image gallery in another resource group.
Steps to reproduce:
Image UUID:
gallery://PUBX-RHEL-8
(which is created in azure resource group rg-azeun-X)"Failed to create a compute XY (Azure Resource Manager) instance app01-test-rhel8-d.azure.pubx: \"message\": \"MsRestAzure::AzureOperationError: InvalidParameter: The value of parameter imageReference.publisher is invalid."
IMHO problem is that image_reference is fetched from VM resource group name and not from original resource group name which is image belongs to.
Changing of rg_name to fixed string with original resource group name 'rg-azeun-X' in file managed_vm.rb on line 87 (in function define_image()) helps and VM is created successfully.
https://github.com/apuntamb/foreman_azure_rm/blob/6e6d4ec4d578bf637af913404fc15aa8a4e348dd/app/models/concerns/foreman_azure_rm/vm_extensions/managed_vm.rb#L87
The text was updated successfully, but these errors were encountered: