This article refers to the ARM Template of Git Hub:
https://github.com/Azure/azure-quickstart-templates/blob/master/201-vm-specialized-vhd-existing-vnet/azuredeploy.json
But the Template on Git Hub does not contain Availability Set
I modified this Template to set a high availability set:
https://github.com/leizhang1984/AzureChinaPowerShell/tree/master/ARM/VMSpecializedVHD
In many cases, we need to create a new ARM VM from the VHD file of the operating system disk of the Classic VM.
The key steps here are as follows:
1. Create a Classic VM and obtain the VHD path of the OS Disk
2. Create a new one through ARM Portal: https://portal.azure.cn
- Azure ARM Resource Group
- ARM Storage Account
- ARM Virtual Network和Subnet
3. If the Classic VM is powered on, use the AzCopy tool to copy the VHD files of the OS Disk and Data Disk to different containers in the same storage account (Classic Storage).
Then copy the VHD from Classic Storage Account to ARM Storage Account
4. If the Classic VM is powered off, use the AzCopy tool to copy the VHD files of the OS Disk and Data Disk to the ARM Storage Account.
5. Run Azure PowerShell to execute Template Deployment
Let's start this section
1. First , we create a new Azure Classic VM in ASM mode ( https://manage.windowsazure.cn ). Steps omitted.
2. Check the OS Disk and Data Disk of this Classic VM, as shown in red in the following figure:
3. Create a new one through ARM Portal: https://portal.azure.cn
- Azure ARM Resource Group
- ARM Storage Account
- ARM Virtual Network和Subnet
4. To facilitate copying VHD, we shut down the virtual machine first. (Note that you must bind the fixed VIP and intranet DIP before shutting down)
5. Use the AzCopy tool to copy the VHD files of OS Disk and Data Disk to the ARM Storage Account.
6. After copying, we need to modify the corresponding ARM Template
https://github.com/leizhang1984/AzureChinaPowerShell/tree/master/ARM/VMSpecializedVHD
7. azuredeploy.json in Git Hub, no need to modify
8. In azuredeploy.parameters.json in Git Hub, make the following changes:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"dnsNameForPublicIP": {
//Must be lowercase
"value": "leiarmvmpublicip"
},
"existingVirtualNetworkName": {
//Virtual network name, manually pre-selected and created
"value": "LeiARMVNet"
},
"existingVirtualNetworkResourceGroup": {
//In ARM mode, Resource Group name
"value": "LeiARMRG"
},
"subnetName": {
//In ARM mode, virtual network subnet name
"value": "subnet-1"
},
"osDiskVhdUri": {
//VHD file of the operating system
"value": "https://leiarmstorage.blob.core.chinacloudapi.cn/vhds/LeiASMWeb01-LeiASMWeb01-2017-03-27.vhd"
},
"vmName": {
//Virtual machine name
"value": "LeiARMVMWeb01"
},
"osType": {
//Operating system type
"value": "Windows"
},
"vmSize": {
//VM instance size
"value": "Standard_D1_V2"
},
"diagStorageAccountName":{
//Storage Account Name used by diag, must be lowercase
//Can be the same as the Storage Account Name where osDiskVhdUri is located
"value": "leiarmstoragediag"
},
"availabilitySetName":{
//High availability set name
"value": "Web-AvbSet"
}
}
}
10. Run Azure PowerShell to verify:
#Login Azure China Cloud
Add-AzureRmAccount -EnvironmentName AzureChinaCloud;
# Select Azure China subscription ID
Select-AzureRmSubscription -SubscriptionID '[Subscription ID]'
#Execute Azure Deploy
New-AzureRmResourceGroupDeployment -Name ExampleDeployment -ResourceGroupName LeiARMRG -Mode Incremental -TemplateFile 'D:vmforuserimageazuredeploy.json' -TemplateParameterFile 'D:vmforuserimageazuredeploy.parameters.json'
11. After the execution is completed, the VHD file of the ARM Storage Account will be created in a new ARM VM. As follows:
Previous article:Azure ARM (12) In ARM mode, set multiple public IP addresses on the load balancer
Next article:Azure ARM (15) Create an ARM VM based on an existing VHD file
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- [Domestic RISC-V Linux Board Fang·Starlight VisionFive Trial Report] Environment Preparation-Design Data Sheet
- Basic knowledge of Verilog HDL.pdf
- MSP430 MCU GPIO Programming
- ODDR_has_invalid_load: ODDR cell xxxx loads should only be an output buffer o...
- MPS charging chip will help you achieve success. Submit your creative ideas and win a New Year lucky backpack, or even a cash prize of 10,000 yuan!
- I.H.P. SAW
- What does an * after a file name in KEIL mean?
- TPS61023 protects your health
- Method for ultrasonic testing based on waveform capture
- Introductory resources for machine learning, highly recommended for beginners!