After communication with Azure staff, I confirmed that this error was caused by a small problem on the Windows azure platform. there should be no more people like the author in the future, and it is a coincidence that the virtual machine is restarted when this rare problem occurs.
According to the steps given in the references, the author successfully solved this problem. the solutions listed here are as follows. but when you encounter an inexplicable state of the virtual machine, this is indeed a way to try. this method is safe and will not delete your VM. in essence, after the virtual machine is deleted, it is re-deployed. but the result looks like the VM is restarted.
Error description
First, refer to the steps described in correcting a small error in <start using Windows azure powershell> to enable powershell and run commands to manipulate windows azure.
Then, run the get-azureservice command to get the name of the service you are using. The name here is the highlighted part of The Blur.
Then, run the following commands in sequence:
Export-azurevm
Remove-azurevm
Import-azurevm
The problem was solved successfully and the VM was started.
Note: After using this method, the IP address of the virtual machine changes. Therefore, you may need to modify the ing between the IP address and the machine name in the DNS.
The configuration in the original DNS has not changed, so it should be changed to 10.4.2.8.
References
======================================
Machine cannot restart due to rolestateunknown
Http://social.msdn.microsoft.com/Forums/en/WAVirtualMachinesforWindows/thread/5b7063d7-51b4-4258-bff5-2269dd385f85