Login into your Cisco UCS Manager by SSH, execute command "show cluster state"

a.png

Enter local management mode

b.png

execute the command "cluster lead a|b" to switch it.

c.png