How to map Azure Disks to Windows VM guest disks
Applies to: ✔️ Windows VMs
You may need to determine the Azure Disks that back a VM's guest disks. In some scenarios, you can compare the disk or volume size to the size of the attached Azure Disks. In scenarios where there are multiple Azure Disks of the same size attached to the VM you need to use the Logical Unit Number (LUN) of the data disks.
What is a LUN?
A Logical Unit Number (LUN) is a number that is used to identify a specific storage device. Each storage device is assigned a unique numeric identifier, starting at zero. The full path to a device is represented by the bus number, target ID number, and Logical Unit Number (LUN).
For example: Bus Number 0, Target ID 0, LUN 3
For our exercise, you only need to use the LUN.
Finding the LUN
There are two methods to finding the LUN, which one you choose will depend on if you are using Storage Spaces or not.
If you are not using Storage Pools, you can use Disk Management to find the LUN.
- Connect to the VM and open Disk Management
a. Right-click on the Start button and choose "Disk Management"
a. You can also type
diskmgmt.mscinto the Start Search box
- In the lower pane, right-click any of the Disks and choose "Properties"
- The LUN will be listed in the "Location" property on the "General" tab
- Connect to the VM and open Server Manager
- Select "File and Storage Services", "Volumes", "Storage Pools"
- In the bottom-right corner of Server Manager, there will be a "Physical Disks" section. The disks that make up the Storage Pool are listed here as well as the LUN for each disk.
Finding the LUN for the Azure Disks
You can locate the LUN for an Azure Disk using the Azure portal, Azure CLI, or Azure PowerShell
Finding an Azure Disk's LUN in the Azure portal
- In the Azure portal, select "Virtual Machines" to display a list of your Virtual Machines
- Select the Virtual Machine
- Select "Disks"
- Select a data disk from the list of attached disks.
- The LUN of the disk will be displayed in the disk detail pane. The LUN displayed here correlates to the LUNs that were looked up in the Guest using Device Manager or Server Manager.