Azure environment: 1 dc+2 SQL 2012 (with SQL VM in library, not VM self-built SQL Server)
Fault:
In the AlwaysOn Wizard, this error message appears:
Failed to bring availability Group ' HADB ' online. The operation timed out. Verify The local Windows Server Failover Clustering (WSFC) node is online. Then verify, the availability group resource exists in the WSFC cluster. If the problem persists, you might need to drop the availability group and create it again.
Failed to create Availability group ' HADB '. The operation encountered SQL Server error 41131 and have been rolled back. Check the SQL Server error log for more details. When the cause of the error has been resolved, retry CREATE availability GROUP command. (Microsoft SQL Server, error:41131)
Workaround:
1. Create NT AUTHORITY\SYSTEM Account
USE [master]
GO
CREATE LOGIN [NT AUTHORITY\SYSTEM] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
2. Grant NT AUTHORITY\SYSTEM Account
GRANT ALTER ANY AVAILABILITY GROUP TO [NT AUTHORITY\SYSTEM]
GO
GRANT CONNECT SQL TO [NT AUTHORITY\SYSTEM]
GO
GRANT VIEW SERVER STATE TO [NT AUTHORITY\SYSTEM]
GO
PS: In the IaaS VM deployment AlwaysOn Note Oh, manually configure the cluster IP after the cluster is created.
This article from "Gs_hao" blog, declined reprint!
[Case sharing] 41131 error when building SQL AlwaysOn on Azure IaaS vm