0
0
Azurecloud~30 mins

VM sizes and series (B, D, E, F) in Azure - Mini Project: Build & Apply

Choose your learning style9 modes available
Azure VM Sizes and Series Selection
📖 Scenario: You are setting up virtual machines (VMs) in Azure for different workloads. Each VM size belongs to a series that fits specific needs:B-series: Economical, burstable VMs for light workloads.D-series: General purpose VMs with balanced CPU and memory.E-series: Memory optimized VMs for heavy memory workloads.F-series: Compute optimized VMs for CPU intensive tasks.You want to organize VM sizes by their series to help choose the right VM for your projects.
🎯 Goal: Create a dictionary of Azure VM sizes with their series, then filter and list VM sizes by series to understand their grouping.
📋 What You'll Learn
Create a dictionary called vm_sizes with exact VM size names as keys and their series as values.
Create a variable called selected_series and set it to the string 'D'.
Use a list comprehension to create a list called d_series_vms containing VM sizes from vm_sizes that belong to the selected_series.
Add a final configuration line that sets a variable total_d_vms to the count of VM sizes in d_series_vms.
💡 Why This Matters
🌍 Real World
Organizing and selecting Azure VM sizes by series helps cloud architects choose the right VM for workloads, optimizing cost and performance.
💼 Career
Cloud engineers and architects often need to understand VM series to design scalable and cost-effective infrastructure.
Progress0 / 4 steps
1
Create the Azure VM sizes dictionary
Create a dictionary called vm_sizes with these exact entries: 'Standard_B1s': 'B', 'Standard_D2s_v3': 'D', 'Standard_E4s_v3': 'E', 'Standard_F8s': 'F', 'Standard_B2ms': 'B', 'Standard_D4s_v3': 'D'.
Azure
Need a hint?

Use curly braces {} to create a dictionary with the exact keys and values.

2
Set the selected VM series
Create a variable called selected_series and set it to the string 'D' to select the D-series VMs.
Azure
Need a hint?

Assign the string 'D' to the variable selected_series.

3
Filter VM sizes by the selected series
Use a list comprehension to create a list called d_series_vms that contains all VM size names from vm_sizes where the series matches selected_series.
Azure
Need a hint?

Use a list comprehension with vm_sizes.items() to filter keys where the value equals selected_series.

4
Count the number of D-series VM sizes
Add a line that creates a variable called total_d_vms and sets it to the length of the list d_series_vms.
Azure
Need a hint?

Use the len() function to count the items in d_series_vms.