If you follow this blog or Windows Azure news in general you already aware that one of the new features available with the June 2012 release of the Windows Azure Platform is Virtual Machines. Windows Azure Virtual Machines enable you to easily deploy and run Windows Server and Linux virtual machines in minutes. One of the great features available with Windows Azure virtual machines is the ability to custom your VM and then capture the image so that you can create new VM’s based on your own specific needs. In this post I’ll show you how to do just that.
Step 0: Create a Windows Azure Virtual Machine. See this post for instructions how to do so.
Step 1: Log in to the new Windows Azure management portal at http://manage.windowsazure.com.
Step 2: Click VIRTUAL MACHINES.
Step 3: Select the virtual machine you want to creatable a reusable image of.
Step 4: Click CONNECT at the bottom of the page and login to the RDP session with the credentials you specified as part of the virtual machine creation process.
Step 5: Once the RDP session has started we need to SysPrep the machine. Open a command prompt as an administrator and enter the following command cd %windir%\system32\sysprep to change to the sysprep directory.
Step 6: Enter sysprep.exe to launch the SysPrep utility.
Step 7: Select Enter System Out-of-Box Experience (OOBE) for the System Cleanup Action and ensure the Generalize checkbox is checked. Also select Shutdown for Shutdown Options.
Step 8: Wait until the virtual machine has stopped running.
Step 9: Click the CAPTURE button at the bottom of the page.
Step 10: Enter a name for your image, click the I have sysprepped this virtual machine checkbox and click the checkmark on the bottom right of the page.
Step 11: Once the image is created you can see it by click the IMAGES link at the top of the page.
Step 12: To create a new VM based on your custom image click the NEW button at the bottom of the page.
Step 13: Click VIRTUAL MACHINE.
Step 14: Click FROM GALLERY.
Step 15: Click MY IMAGES and you should see your new image on the page. Select it and continue to configure the virtual machine as you would any other Windows Azure virtual machine.
I also created a screencast that walks you through the steps above. To view it, just click on the image below.