Blog Stats
  • Posts - 24
  • Articles - 0
  • Comments - 15
  • Trackbacks - 0

 

Azure Virtual Machine disappeared on me

I had been putting together a solution for a client over the past few weeks using Microsoft Azure, and had been really enjoying their new Virtual Machine functionality.  The other morning I logged in to make some changes to the virtual machine and noticed it was missing!

After browsing the web and asking around, the answer is that once the free azure trial runs out, rather than charge any money Microsoft destroys the virtual machine compute instance.

The VHD is still on the Azure blob storage, but the compute instance is no more.

Well, not entirely no more - When you try to create a new Azure IaaS Virtual Machine - this time with money on the table - Microsoft Azure will inform you that the name is already taken.  

When Microsoft destroyed your machine, little pieces of Virtual Machine are still left in their infrastructure.  Now it is time to pull out Azure Power Shell to clean up the little bits of Virtual Machine still lying around so that you can get the system back to where you started.

Download and install PowerShell and the Azure Commandlets:  https://www.windowsazure.com/en-us/manage/downloads/

And when you start up PowerShell, you will need to synchronize PowerShell with your Azure Compute instance - To do this you will need your publish settings file (the same one you use to synchronize Azure with Visual Studio)  - Pull that down from here: https://windows.azure.com/download/publishprofile.aspx and save that somewhere convenient.

Here are some sample Azure Commandlets for PowerShell: http://msdn.microsoft.com/en-us/library/windowsazure/jj152841

But the ones you want are:

*** Connect PowerShell to your Azure instance

$cert = Get-File D:\path\my.pubsettings
Import-AzurePublishSettingsFile $cert

*** Delete the phantom azure virtual machine
Remove-AzureVM servicename -myvirtualmachine


*** You should now be able to create a new virtual machine with the same name as the old virtual machine.
*** It is possible to see the virtual machines you currently have running - strangely enough, the one that Microsoft destroyed will likely not be in this list

$myMachines = Get-AzureVM
$myMachines

*** This will list every active virtual machine you have on your account

Good luck!




Feedback

# re: Azure Virtual Machine disappeared on me

Gravatar I'm now in this situation after several hours of configuring our new dev environment. You have GOT to be kidding, just when I'm thinking that Microsoft might actually still have some good products and ideas, they let this kind of thing happen. And guess what, you can win the lottery, get struck by lightning and get laid by a total hotty all before you'll even figure out how to begin the process of getting support for Azure. I'm dropping Azure now and heading back to my old provider... with my tail between my legs... thanks once again to Microsoft for reminding me why the world chooses open source alternatives. 11/30/2012 4:19 PM | Matt

# re: Azure Virtual Machine disappeared on me

Gravatar Thanks for posting this. took me an hour of googling just to find MS deleted my message queue and left the name floating in their servers. real slick move there MS. good job. 4/23/2014 5:18 PM | Malcom

Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 
 

 

 

Copyright © jkrebsbach