Azure – Lost RDP access to Azure VM after Sysprep

azureremote-accesssysprepuser-accountsvirtual-machines

I made a stupid mistake. While looking for an easy way to make a backup of my Azure VM I followed directions to make a snapshot of the VM machine. In AWS (*which I am used to) a snapshot is a quick way to make an easily restorable backup. I guess MS uses a different concept.

During the steps I followed I ran sysprep on the VM. I stopped before I managed to delete the current VM, but it still seemed to delete all my access to that server.

Right now I am able to run the VM and see the web site, but I have no access via RDP to the machine. The endpoint is there, but it doesn't let me in.

How do I regain access to the running VM?

Best Answer

Sysprep is used to clone a VM not for backup purpose. By doing the above, you've reset the Windows VM to a default state which can be used for provisioning new VMs. Any 'user specific' settings would be lost but your files (non user specific) would still be on the VM.

You cannot regain access to the same Windows installation on the VM as it is gone now. What you can do is use the Image to create a new VM and then reconfigure that VM to act like your old one you just sysprepped. Hopefully this will be a minor task but it would depend on how customized your VM was.

To complete the explanation, the term snapshot is used in the context of an Amazon AMI wherein you can use it to clone a VM.