想问一下,vm的root密码忘了,有什么解决办法

想问一下,vm的root密码忘了,有什么解决办法?

您好,
请问你的虚拟机运行的是什么操作系统呢?如果是Windows Server并且你在创建虚拟机的时候安装了VM代理的话,你可以通过Azure PowerShell的命令来修改你创建虚拟机时所定义的账户的密码:
首先,请你查看是否安装了VM agent :
(Get-AzureVM -ServiceName xxx -Name xxx).VM.ProvisionGuestAgent (如果返回的是True,则表示安装了)
Get-AzureVM -ServiceName xxx -Name xxx | Set-AzureVMAccessExtension -UserName xxx -Password xxx | Update-AzureVM
如何使用Azure PowerShell,你可以参考下面的文章:
http://www.windowsazure.cn/zh-cn/develop/python/how-to-guides/powershell-cmdlets/
如果是Linux的操作系统的话,需要安装VMAccess扩展,更多的信息你可以参考下面的文章(英文):
http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-use-vmaccess-reset-password-or-ssh/
Susie