How to find available disk space in an Azure virtual machine scale set?

gpierr01admin 0 Reputation points
2024-02-02T13:42:22.93+00:00

I am trying to locate the available disk space for a virtual machine scale set in Azure. Can someone guide me on how to find this information?

Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
547 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sumarigo-MSFT 42,601 Reputation points Microsoft Employee
    2024-02-07T10:05:29.55+00:00

    @gpierr01admin Welcome to Microsoft Q&A Forum, Thank you for posting your query here! Firstly, Apologies for the delay response. Here's some information about disk space for virtual machine scale sets in Azure: When a scale set is created or scaled, two disks are automatically attached to each VM instance. Operating system disk - Operating system disks can be sized up to 2 TB, and hosts the VM instance's operating system. The OS disk is labeled /dev/sda by default. The disk caching configuration of the OS disk is optimized for OS performance. Because of this configuration, the OS disk should not host applications or data. For applications and data, use data disks, which are detailed later in this article. Temporary disk - Temporary disks use a solid-state drive that is located on the same Azure host as the VM instance. Temporary disks are high-performance disks and might be used for operations such as temporary data processing. However, if the VM instance is moved to a new host, any data stored on a temporary disk is removed. The size of the temporary disk is determined by the VM instance size. Temporary disks are labeled /dev/sdb and have a mountpoint of /mnt.

    Multi-VM perspective from Azure Monitor

    Enable VM Insights overview :https://learn.microsoft.com/en-us/azure/azure-monitor/vm/vminsights-enable-overview

    Send guest OS metrics to the Azure Monitor metric store by using an Azure Resource Manager template for a Windows virtual machine scale set: https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/collect-custom-metrics-guestos-resource-manager-vmss User's image

    You can also list and see the Disk Size on VMSS:https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/tutorial-use-disks-powershell

    # Connect to your Azure account (if not already connected)
    Connect-AzAccount
    # Specify the resource group and VMSS name
    $resourceGroup = "YourResourceGroup"
    $vmssName = "YourVMSSName"
    # Get information about the VMSS
    $vmss = Get-AzVmss -ResourceGroupName $resourceGroup -VMScaleSetName $vmssName
    # Display information about the OS disk
    $vmss.StorageProfile.OsDisk
    # Display information about data disks (if any)
    $vmss.StorageProfile.DataDisks
    
    

    Additional information:Go to the Azure portal and navigate to the virtual machine scale set that you want to check. Click on the "Instances" tab to view the list of instances in the scale set. Select an instance from the list and click on the "Disks" tab to view the list of disks attached to the instance. Locate the OS disk and note down the disk name. Go back to the virtual machine scale set and click on the "Scale set properties" tab. Scroll down to the "Automatic OS disk resize" section and click on the "Configure" button. In the "Configure automatic OS disk resize" blade, select the disk that you noted down in step 4.

    1. The "Available size" field shows the available disk space for the OS disk.

    Please let us know if you have any further queries. I’m happy to assist you further.     

    ---Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments