Hello VasanthKumar Kanneri,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that your Azure batch node stays in starting for very long and moves to unusable state.
Though, this s a common problem, check the best practices steps - https://learn.microsoft.com/en-us/azure/batch/best-practices and learn how to detect and avoid failures in pool and node background operations - https://learn.microsoft.com/en-us/azure/batch/batch-pool-node-error-checking
Yes, as you mentioned, subnet delegation can indeed cause the issue you're experiencing with Azure Batch nodes becoming unusable. When a subnet is delegated to a specific service, it can prevent the Azure Batch service from allocating nodes properly. Your question did not explain either you specify subnet delegation or you're referring to the link in your question.
However, if Subnet Delegation is Specified:
Disable Subnet Delegation: You need to remove the subnet delegation. This can be done through the Azure portal, PowerShell, Azure CLI, or an Azure Resource Manager template. For more detailed steps, refer to the Microsoft documentation on adding or removing subnet delegation - https://learn.microsoft.com/en-us/azure/virtual-network/manage-subnet-delegation and https://learn.microsoft.com/en-us/troubleshoot/azure/hpc/batch/azure-batch-pool-resizing-failure
And If Subnet Delegation is Not Specified:
Check Other Configuration Issues:
- Ensure that your Network Security Group (NSG) rules are correctly configured to allow necessary inbound and outbound traffic.
- Verify that your subnet has enough IP addresses to allocate to the pool nodes.
- Confirm that your Batch account has sufficient core quota and that the VM size you selected is compatible with the image you're using.
If you continue to face issues after addressing the subnet delegation, it might be helpful to review other potential causes mentioned earlier or contact Azure support via your portal.
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.