VMware

Find Which VMDK your Windows Server Disk matches

Have you ever been in the situation of needed to extend a Windows Server hard disk in a VMware vSphere VM and was unsure which disk to extend? This is especially the case if you have multiple disks that are configured as the same size. Also, as most of you know, you can’t go by the order of the drive lettering and other clues in Windows to effectively find which VMDK is associated with which Windows disk. How can you match Windows disk with VMware VMDK to see which drive to extend? Also, what if you have multiple SCSI controllers in play with your VMware vSphere VM? This confuses things even more. Let’s take a look at how to find which VMDK your Windows Server Disk matches.

Find Which VMDK your Windows Server Disk matches

The way to find which VMDK your Windows Server Disk matches is not strikingly obvious when looking at Windows Server disk statistics and vSphere Client virtual machine properties. Finding VMDK to Windows disk matching is easy enough to do when disk sizes are totally different. You can simply look at the Windows disk and the corresponding VMDKs allocated to the VMware VM and match them that way. However, when the disk sizes are the exact same in Windows, this is when things get a bit tricky or at least not too obvious. However, there are a few things we can look at that can help us put “two and two” together to determine which VMDKs are matched to which Windows Server disks. Let’s take a look at what you need to look at. Let’s look at two different scenarios:

  1. Multiple hard disks on a single SCSI controller
  2. Multiple hard disks on multiple SCSI controllers

As you can see below, the three different disks are the exact same size. This makes it difficult to determine simply by looking at the size of the disks to determine which VMDK is backing the Windows Server disk.

A windows server with multiple disks mounted from different scsi controllers
A windows server with multiple disks mounted from different SCSI controllers

Below is a view of the actual virtual machine configuration with multiple hard disks and multiple SCSI controllers.

Vm configuration showing the scsi controllers and hard disks
Vm configuration showing the scsi controllers and hard disks

1. Multiple hard disks on a single SCSI controller

This may be the more likely scenario of the two listed. For many, they will be using multiple disks connected to a single SCSI controller. How do you determine which VMDK backs which disk?

First, look at the properties of the Windows Server disk in disk management. You can get to disk management by typing diskmanagement.msc. Right-click the Disk # tile and select properties. This will bring up the VMware Virtual disk SCSI Disk Device Properties. On the General tab, look at the location. We want to key in on the Target id. If you have a single SCSI controller, you will look at the disks on the SCSI controller and see which disk has an ID of 1.

Looking at the target id for the vmware virtual disk scsi disk device properties
Looking at the target id for the vmware virtual disk scsi disk device properties

For the corresponding VMDK, we will look for the disk with the same SCSI identifier. Notice the SCSI identifier below is also a 1. Below, I still have the screenshot for the multiple controllers, but a single controller VM will have the SCSI addresses for multiple disks of:

  • SCSI(0:0)
  • SCSI(0:1)
  • SCSI(0:2)
  • so on…
Looking at the scsi address for the vmdk hard disk
Looking at the scsi address for the vmdk hard disk

2. Multiple hard disks on multiple SCSI controllers

What though if like the VM configuration I have pictured above, you have multiple SCSI controllers? Below I have opened the properties of the multiple disks to show how you can tell which disks are on which controller, then you can look at the SCSI ID. The Location is the clue here on which controller is which. The first controller and each consecutive controller are addressed sequentially or at least in all cases I have seen. So the lowest Location is the first controller or SCSI Controller 0. The next is the next highest number, so Location 224. The final SCSI Controller, SCSI Controller 3, is the highest Location, so Location 256. That helps to see which SCSI controller you are dealing with for the VM. Then you go to the logic of looking at the SCSI IDs to see which disk is which using the method listed above to determine the VMDK.

Multiple scsi controllers to vmdk mappings
Multiple scsi controllers to vmdk mappings

Using this approach, you can effectively identify the VMDKs that are backing the respective Windows Server disks even when these disks are identical and even when you have multiple SCSI controllers in play on your virtual machine.

Concluding thoughts

When you need to extend or even delete a virtual disk, you want to make sure you get the right one! If you have multiple disks on a Windows Server, especially if these are the same size, it can be tricky to determine which disk is which VMDK on your underlying VM configuration. However, by looking at the IDs in Disk Management and correlating these to the VMDK SCSI addresses, you can find which VMDK your Windows Server disk matches and effectively see which disk is which. Also, the Location address helps to determine which SCSI Controller is which as well.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.