Stop the virtual machine of this product if it is running.
Go to the Virtual machines service on the Azure portal, select a virtual machine, and click Stop to stop the virtual machine.
Use snapshots to create new disks.
Click Add in the Disks service of the Azure portal and then use all the snapshots of the virtual machine of this product to create new disks (OS disk and Data disks).
Configure the settings as follows.
Item | Setting Details |
---|---|
Name | Including the virtual machine name is recommended to easily find the created volume for future operations. In addition, if multiple data disks are attached, including a name to easily identify the connection order is recommended. |
Subscription | Use the same setting as for the snapshot source disk. |
Resource group | Use the same setting as for the snapshot source disk. |
Location | Use the same setting as for the snapshot source disk. |
Account type | Standard SSD |
Source type | Snapshot |
Source snapshot | Snapshot in the virtual machine of this product |
Size | Use the same setting as for the snapshot source disk. |
Use Azure CLI to replace the OS disk with the disk created in step 2.
Execute the following command to check the ID of the created OS disk.
az disk show --name "disk name" --resource-group "resource group name"
Include the following information in the command.
Item | Setting Details |
---|---|
disk name | Name of the OS disk specified in step 2 |
resource group name | Name of the resource group specified in step 2 |
The "id" value in the output results represents the disk ID.
Run the following command to replace the OS disk with the created disk.
az vm update -n "virtual machine name" -g "resource group name" --os-disk "id"
Include the following information in the command.
Item | Setting Details |
---|---|
virtual machine name | Name of the virtual machine of this product |
resource group name | Name of the resource group for the virtual machine of this product |
id | Disk ID |
Confirm that the OS disk have been replaced.
Go to the Virtual machine service on the Azure portal, and click the virtual machine name for this product. Select Disks from the Settings menu, and check the names of the OS disk.
Point
For details about Azure CLI, refer to the Microsoft Azure document "Azure Command-Line Interface (CLI)".
Azure CLI can also be started by clicking the Cloud Shell icon (>_) on the Azure portal.
Detach all of the data disks from the virtual machine.
Go to the Virtual machines service on the Azure portal, and click the virtual machine name.
Select Disks on the Settings menu of the virtual machine, and click Edit.
To detach the data disks, click a detach icon to the right side of each line where a data disk is displayed. Click Save when you finish detaching disks.
Add all of the data disks from step 2 in the order in which they were connected to the virtual machine.
Click Add data disk to select and add data disks. If the HOST CACHING option is available, make sure the settings match the previous data disks. Click Save when you finish adding disks.
Delete all the previous data disks connected to the virtual machine of this product.
Perform the following operations for all of the previous data disks.
Go to the Disks service on the Azure portal, and click the disk name.
Click Delete to delete the disk.