Hello Ngô Minh Tùng,
Thank you for your question and for reaching out with your question today.
The "Forming cluster" phase involves creating a Windows Server Failover Cluster in preparation for configuring the Always On Availability Group. Here are some steps and troubleshooting tips that might help you resolve it getting stuck:
Double-check that you have met all the prerequisites for setting up a WSFC in a workgroup environment. This includes configuring DNS, network settings, time synchronization, and ensuring that there are no firewall rules blocking the necessary communication.
Confirm that both servers can communicate with each other over the network. Use tools like ping and telnet to verify connectivity between the servers on the required ports.
Ensure that both servers have synchronized time. In a workgroup environment, you might consider using an external time source or configuring one server as the time source for the other.
Verify that you are using an account with local administrator privileges on both servers when configuring the cluster.
If the reply was helpful, please don’t forget to upvote or accept as answer.