I have an Azure VM where I host a number of websites. Recently, I logged in and it needed some security updates so according to this link (https://askubuntu.com/questions/196768/how-to-install-updates-via-command-line), I ran this script.

sudo apt-get update  && sudo apt-get upgrade && sudo apt-get dost-upgrade

It did its thing, installing patches and then asked me to restart my VM. After I did that, I now can no longer ssh into it, I can't access the web applications and I can't ping it.

I've tried restarting the VM in the Azure portal and although the status is Running, and Azure thinks the VM is working, the VM is completely unresponsive.

I have a feeling maybe the patches corrupted the VM itself. But I have no way to tell because I can't connect to it to see what's going on and I can't even access any logs.

What can I do in this situation?

  • Contact Azure support. – EEAA Dec 7 '15 at 20:58

If your VM is a V2, the boot diagnostics may help to find the problem:



  • So I did what you asked and I'm getting this error - how do I fix this? (prodenv.blob.core.windows.net/…) – RoboShop Dec 8 '15 at 10:16
  • Unfortunately it seems that you would have to boot the VM on a live CD image to debug this. To do that you would have to download the VHD, build a VM on a local Hyper-V, debug the problem and upload the VHD back to Azure. – Pascal Sauliere Dec 9 '15 at 7:40

I had a similar issues with a Ubuntu ARM VM on Azure. I logged into my VM, ran a similar update as RoboShop, then rebooted my VM. Once it rebooted I could not login.

I'm not sure what caused the issue but I fixed it by resetting my VM's password. Unfortunately you can't reset the password via new Azure Portal. It simply says "coming soon".

I reset the password via PowerShell using the steps found at:


In summary the steps are:

1) Fire up the Azure PowerShell and connect to Azure account. If you are like me and can never remember how to do this run the following command:


2) Switch to ARM commands:

Switch-AzureMode -Name AzureResourceManager

3) Reset the SSH connection. The command might take a minute or two so be patient. When it's complete you should see a "Status: Succeeded" message. Don't forget to change everything in "<>" brackets:

Set-AzureVMExtension -ResourceGroupName "<ResourceName>" -VMName "<VMName>" -Location "<VMLocation>" -Name "VMAccessForLinux" -Publisher "Microsoft.OSTCExtensions" -ExtensionType "VMAccessForLinux" -TypeHandlerVersion "1.2" -SettingString "{}" -ProtectedSettingString '{"reset_ssh":true}'

4) Restart the VM via the Azure Portal.

5) Set the new password. Notice that this command just changes an existing username's password. It dose note create a new user. This command also takes a while and should produce a "Status: Succeeded" message. Change everything in "<>" brackets and don't forget the existing username and new password:

$RGName = '<ResourceName>'
$VmName = '<VMName>'
$Location = '<VMLocation>'
$ExtensionName = 'VMAccessForLinux'
$Publisher = 'Microsoft.OSTCExtensions'
$Version = '1.2'
$PublicConf = '{}'

$PrivateConf = '{"username":"<ExistingUserName>", "password":"<NewPassword>", "ssh_key":"", "reset_ssh":false, "remove_user":""}'

Set-AzureVMExtension -ResourceGroupName $RGName -VMName $VmName -Location $Location -Name $ExtensionName -Publisher $Publisher -ExtensionType $ExtensionName -TypeHandlerVersion $Version -SettingString $PublicConf -ProtectedSettingString $PrivateConf

6) Now you should be able to SSH into the VM with your new password.


Check if the public IP got changes( happens if IP is not configured as static ), In Case the Ip is used to connect from SSH

It is preferred to connect using DNS name instead, you know right :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.