More Info:
Ensure that your Microsoft Azure virtual machines (VMs) are using Standard SSD disk volumes instead of Premium SSD volumes for cost-effective storage that fits a broad range of workloads from web servers to enterprise applications that need consistent performance at lower IOPS levels. Unless you are running mission-critical applications or performance sensitive workloads that need more than 6000 IOPS or 750 MiB/s of throughput per VM disk volume, it’s recommends converting your Premium SSD volumes to Standard SSD in order to lower the cost of your Azure monthly bill.Risk Level
LowAddress
Cost OptimizationCompliance Standards
CBPTriage and Remediation
Remediation
Using Console
Using Console
To remediate the “Virtual Machines Should Use Standard SSD” misconfiguration in Azure using the Azure console, follow these steps:
- Navigate to the Azure portal and log in with your credentials.
- Click on the “Virtual machines” option in the left-hand menu.
- Select the virtual machine that you want to remediate.
- Click on “Disks” in the left-hand menu.
- Select the disk that you want to update to use Standard SSD.
- Click on “Change SKU” at the top of the page.
- Select “Standard SSD” from the dropdown menu.
- Click “Save” to apply the changes.
Using CLI
Using CLI
To remediate the misconfiguration “Virtual Machines Should Use Standard SSD” for Azure using Azure CLI, please follow the below steps:Step 1: Open the Azure CLI in your terminal.Step 2: Run the following command to list all the virtual machines in your subscription:This command will list all the virtual machines along with their OS disk name and disk type (whether it is using Standard HDD, Standard SSD or Premium SSD).Step 3: Identify the virtual machines that are using Standard HDD or Premium SSD disks. These virtual machines need to be remediated to use Standard SSD disks.Step 4: Run the following command to update the disk type of the identified virtual machine to Standard SSD:Make sure to replace This command should return the value “Standard_LRS”, indicating that the virtual machine is now using Standard SSD disks.Step 6: Repeat steps 3-5 for all the virtual machines that are using Standard HDD or Premium SSD disks.By following these steps, you can remediate the misconfiguration “Virtual Machines Should Use Standard SSD” for Azure using Azure CLI.
<resource-group-name>
with the name of the resource group where the virtual machine is located and <vm-name>
with the name of the virtual machine that needs to be remediated.Step 5: Verify that the disk type of the virtual machine has been updated to Standard SSD by running the following command:Using Python
Using Python
To remediate the misconfiguration “Virtual Machines Should Use Standard SSD” for AZURE using Python, you can follow the below steps:
- First, you need to identify the virtual machines that are not using standard SSD disks. You can achieve this by using the Azure Python SDK.
- Install the Azure Python SDK by running the following command in your terminal:
- Once you have installed the SDK, you need to authenticate to your Azure account. You can do this by creating a Service Principal and providing the necessary credentials.
- After authentication, you need to create a compute client using the Azure Python SDK. You can do this by running the following code:
- Once you have created the compute client, you can use it to retrieve a list of virtual machines in your subscription. You can do this by running the following code:
- The above code loops through all the virtual machines in your subscription and checks if they are using standard SSD disks. If a virtual machine is not using standard SSD disks, it updates the disk to use standard SSD and saves the changes.
- After running the above code, you can verify that all your virtual machines are using standard SSD disks by checking the storage account type of the disks associated with each virtual machine.