theforeman / foreman_azure_rm

Adds Azure Resource Manager as a compute resource for The Foreman
GNU General Public License v3.0
9 stars 24 forks source link

Cannot provision Virtual Machine in Azure- Subnet reference is required #194

Open khain0 opened 22 hours ago

khain0 commented 22 hours ago

Problem: Cannot provision Virtual Machine in Azure - Subnet reference is required

Expected outcome: Provision host on Azure using DHCP from Azure.

Foreman and Proxy versions: 3.11.2

Foreman and Proxy plugin versions: rubygem-foreman_azure_rm-2.3.0-1.fm3_11.el9.noarch

Distribution and version: RHEL 9.4 I don’t have any DHCP proxy installed nor configured. I want to use DHCP on Azure.

The error is: Failed to create a compute Azure West Europe - Linux Test (Azure Resource Manager) instance CENSORED: { “message”: “MsRestAzure::AzureOperationError: SubnetIsRequired: Subnet reference is required for ipconfiguration /subscriptions/CENSORED/resourceGroups/CENSORED/providers/Microsoft.Network/networkInterfaces/CENSORED-nic0/ipConfigurations/CENSORED-nic0.”, “request”: { “base_uri”: “https://management.azure.com/”, “path_template”: “subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}”, “method”: “put”, “path_params”: { “resourceGroupName”: “CENSORED”, “networkInterfaceName”: “CENSORED-nic0”, “subscriptionId”: “CENSORED” }, “skip_encoding_path_params”: null, “query_params”: { “api-version”: “2020-08-01” }, “skip_encoding_query_params”: null, “headers”: { “Content-Type”: “application/json; charset=utf-8”, “Accept”: “application/json”, “accept-language”: “en-US”, “x-ms-client-request-id”: “6b4052d2-6f3b-4e89-bc4a-2f8ea0d52a3e” }, “body”: “{"location":"westeurope","properties":{"ipConfigurations":[{"properties":{"privateIPAllocationMethod":"Dynamic"},"name":"CENSORED-nic0"}]}}”, “middlewares”: [ [ “MsRest::RetryPolicyMiddleware”, { “times”: 3, “retry”: 0.02 } ], [ “cookie_jar” ] ], “log”: null }, “response”: { “body”: “{"error":{"code":"SubnetIsRequired","message":"Subnet reference is required for ipconfiguration /subscriptions/CENSORED/resourceGroups/CENSORED/providers/Microsoft.Network/networkInterfaces/CENSORED-nic0/ipConfigurations/CENSORED-nic0.","details":}}”, “headers”: { “Cache-Control”: “no-cache”, “Pragma”: “no-cache”, “Content-Length”: “305”, “Content-Type”: “application/json; charset=utf-8”, “Expires”: “-1”, “x-ms-request-id”: “CENSORED”, “x-ms-correlation-request-id”: “CENSORED”, “x-ms-arm-service-request-id”: “CENSORED”, “Strict-Transport-Security”: “max-age=31536000; includeSubDomains”, “x-ms-ratelimit-remaining-subscription-writes”: “199”, “x-ms-ratelimit-remaining-subscription-global-writes”: “2999”, “x-ms-routing-request-id”: “WESTEUROPE:20241021T142527Z:CENSORED”, “X-Content-Type-Options”: “nosniff”, “X-Cache”: “CONFIG_NOCACHE”, “X-MSEdge-Ref”: “Ref A: D6396454D6AF44F8BF28A560A416A8A3 Ref B: DB3EDGE2806 Ref C: 2024-10-21T14:25:27Z”, “Date”: “Mon, 21 Oct 2024 14:25:26 GMT” }, “status”: 400 } } foreman empty azure subnet

chris1984 commented 12 hours ago

Will take a look tomorrow, it sounds like a config issue on the Foreman side of things now. Can you show me what the subnet page looks like in Foreman? Infrastructure -> Subnets -> Your subnet. Also, if you can goto Infrastructure -> Smart Proxies and click on your proxy/foreman fqdn and show me the enabled services.