In real-world IaaS applications, you will often create your own virtual machine image templates to meet the goals of rapid application deployment, such as pre-configured applications, management and monitoring management, and so on.
1. Log in to Windows Azure Dashboard to create a virtual machine as a template
2. Select the virtual machine template and configuration
3. Once created, log in to the virtual machine via Remote Desktop and configure the virtual machine, such as add components or deploy related applications, for example, add IIS and deploy the. NET Framework 4.0.
4. After all deployment tasks are complete, we need to use the Sysprep tool to create a virtual machine image template:
In the Start menu-run, type "Sysprep" and enter.
In the Sysprep tool that opens, we need to select as follows:
- System Cleanup Action:enter system Out-of-box exprience (OOBE)
- Tick generalize Select
- Shutdown Options:shutdown
* Note: Using the Sysprep tool will reinitialize the hardware configuration, network settings, computer name (domain), and user security settings, and if we deploy content that relies on the above, you can write a batch script that automatically runs after the virtual machine starts to assist in configuration.
5. Next go back to Windows Azure Dashboard, select our "Template virtual machine" in the virtual machine, click "Capture"
In the dialog box that pops up, type "name", "description"
Tick "I am running Sysprep on a virtual machine"
When you are finished, you can see the image you just created in the virtual machine "image"
6. When creating a new virtual machine, you can select the saved VM template from my images
Create and use Windows Azure virtual machine templates