Open milanzelenka opened 2 years ago
Hi,
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 ?
Yes, that is a good plan forward, I can make an issue on our sprint board and start to work on it.
Hi,
We have problem when creating VM in resource group from image gallery in another resource group.
Steps to reproduce:
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