Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
khain0 opened this issue Oct 22, 2024 · 5 comments
Open
Assignees

Comments

@khain0
Copy link

khain0 commented Oct 22, 2024

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 chris1984 self-assigned this Oct 22, 2024
@chris1984
Copy link
Member

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.

@khain0
Copy link
Author

khain0 commented Oct 23, 2024

Here are the screenshots you asked for.
foreman subnet details
foreman enabled services in smart proxy

How to enable DHCP from Azure? I already performed:

sudo foreman-installer  --foreman-proxy-dhcp true

@khain0
Copy link
Author

khain0 commented Oct 26, 2024

@chris1984 Any hints in this case?

@chris1984
Copy link
Member

@chris1984 Any hints in this case?

Hey sorry was out for some personal reasons. Catching up on stuff and will get back to this today/tomorrow.

@chris1984
Copy link
Member

@khain0 Can you do the following for me

Open a terminal to the Foreman instance, and do tail -f /var/log/foreman/production.log > /tmp/azure
Try to build a host again and send me that file, you can email me at [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants