3

This morning I found that my Azure VM was dead dead. It was impossible for me to reboot or shut it down.

Anyway I managed to delete the VM instance and make a snapshot copy of the VHD (who never knows...). After creating a new VM and mounting the existing disk I found that all files were in order, so I want to suspect a cluster failure at Azure.

Anyway I have a whole file system full of applications waiting to run again. Surely, reinstalling all software, cloning /etc, /home and other directories to a fresh new VM could be a feasible idea, but I'd like to go back online ASAP.

The problem is that when I go creating a new VM I find no available disk in the Personal Disks tab. But I was able to attach that disk to the fresh new VM. I can also see that disk in the Virtual Machines/Disks tab on Management Console. Actually, I'll have to report Microsoft that a few strange things are happening in that screen (out of question scope and suggesting a problem at Azure), like non-existing disk connecting to already-deleted VM.

So, the question is. Starting from a non-damaged VHD that already ran an Azure Linux VM image (openSuse 12.1, not patched according to this blog post), how do I create a new machine instance that boots with that disk?

usr-local-ΕΨΗΕΛΩΝ
  • 2,359
  • 7
  • 34
  • 52

2 Answers2

1

The following is the normal procedure of recreating a VM with a working disk, plus some troubleshooting.

  1. Write down port mappings. You'll need them later
  2. Delete VM instance. This won't delete the disk as clearly stated by Management Portal
  3. Create a new VM from gallery. In the Disks tab you'll find your current VHD

If you don't see that... like what happened to me

  • Try to delete the disk mapping without deleting the VHD
  • Break the lease with CloudXplorer
  • Under Virtual Machines/Disks tab, create a new disk from the existing VHD that you have not deleted

And then you should see it when creating the new VM.

After creating the VM, wait for it to provision and don't click Start or you'll possibly get an error. I had to create the machine twice

usr-local-ΕΨΗΕΛΩΝ
  • 2,359
  • 7
  • 34
  • 52
  • "Windows Azure has technical problems handling virtual hard disks" - since Azure is a virtualization platform doesn't this mean it is broken? – dunxd Mar 07 '13 at 13:31
  • I'd better omit that part, since it's out of the scope. Of course any virtualization platform can break. I *believe* (but it's only my opinion) that they have a software or hardware error in the cluster running my machine. – usr-local-ΕΨΗΕΛΩΝ Mar 07 '13 at 13:36
  • @djechelon Can you pls elaborate on point 1? Which port mappings in particular? – rism Jun 12 '13 at 11:49
  • @rism all of them. Depending on the services you run on your VM (e.g. FTP, HTTPS, IRC...) you should have set up port mappings accordingly in the firewall. Writing them down helps you avoid mistakes when recreating the machine – usr-local-ΕΨΗΕΛΩΝ Jun 12 '13 at 12:31
  • @djechelon Oh ok so firewall settings as well not just EndPoint mappings in Management Portal Console. Am trying this now so thnx. – rism Jun 12 '13 at 12:42
  • Ok this all went very smoothly for me, piece of cake. One caveat that I read about before doing it is to make sure you create at least one other user account with admin privileges BEFORE doing sysprep. sysprep will block/lock the admin account created when you initially created the VM. So when you go to connect RDP again to your VM copy, that original admin user will be locked out....others say permanently and you'll lose ur work and have to start again. Thankfully i read about this before and so I could remote in to the captured VM copy as other admin user that i manually created pre-sysprep. – rism Jun 12 '13 at 13:47
  • My post was focused about disaster recovery scenarios, which are those in which you cannot actually run sysprep. Th question title features "from existing and working disk". The meaning is that the system image is supposed to be fine for running a certain instance of a VM, not being a template for new VMs – usr-local-ΕΨΗΕΛΩΝ Jun 12 '13 at 14:56
1

Linking to my answer about this on StackOverflow last night: The Azure Dashboard reported service degradation with Virtual Machines, which has since been resolved. Your Virtual Machine operation may have been impacted by this.

David Makogon
  • 2,768
  • 1
  • 20
  • 29