Currently the Windows Azure Management Portal is having some difficulty using the UI to create an Image from an existing Virtual Machine.

You have two different options to create an Image without using the UI.  The two options are using the REST API or PowerShell.  The details of each approach our outlined below.  I have tested both approaches and was able to create an Image and use that Image to create a new Virtual Machine.

Options 1:  Using Windows Azure REST API

1.  Sysprep the Virtual Machine and ensure it is shut down according to the instructions here.

2.  Download my REST API Helper Tool or use your own.

3.  Update the VM-CaptureImage.xml file to have the label name as the name of the Virtual Machine (it can really be anything) and the Image Name as the name of your output image.

4.  Set your Management Certificate, Subscription ID, and working folder path inside the App.config file as outlined in the blog post.

5.  Make an HTTP POST to:<Subscription-ID>/services/hostedservices/<VM-Name>/deployments/<VM-Name>/roleInstances/<VM-Name>/Operations  (assumes the Service Name and VM Name are the same).

6.  Select the updated VM-CreateImage.xml as the POST Body.

7.  This is an Async call and the tool will return an Operations Request ID and auto populate the ability to check the status of that request.

8.  In about 3 to 5 minutes click on “Make REST Service Call” to check the status of the Async Request created above.  You will eventually see a HttpStatusCode 200 and Status Succeeded (rather than Status In Progress).

Options 2: Using Windows Azure PowerShell

1. Sysprep the Virtual Machine and ensure it is shut down according to the instructions here.

2. Setup and configure PowerShell as outlined here.  This takes about 10 minutes.

3. Run the following command: Save-AzureVMImage -ServiceName <Service-Name / Usually VM Name> -Name <Vm-Name> -NewImageName <New-Image-Name>  -NewImageLabel <SomeLabel>

4. In about 3 to 5 minutes the screen will update to show the process was successful.

Keep in mind that Windows Azure Virtual Machines are a Preview Feature so from time to time things like this will happen.  I am sure the Portal will be corrected soon to allow Images via the UI.  Never the less, it is always good to know how to do them programmatically.  Enjoy.