Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Identifying virtual machines with Raw Device Mappings (RDMs) using PowerCLI (2001823)

Purpose

This article provides a method for obtaining and displaying a list of registered virtual machines that have attached Raw Device Mappings (RDMs) using vSphere PowerCLI.

This method cannot identify virtual machine disks that are unregistered, or for RDM files that are not associated with a virtual machine. For more information, see Identifying virtual disks pointing to Raw Device Mappings (RDMs) (1005937).

Resolution

  1. Open the vSphere PowerCLI command-line. For more information, see the vSphere PowerCLI Documentation.

  2. Run the command:

    Get-VM | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName | fl

    This command produces a list of virtual machines with RDMs, along with the backing SCSI device for the RDMs. 

    An output looks similar to:

    Parent
    Virtual Machine Display Name
    Name
    Hard Disk n
    DiskType
    RawVirtual
    ScsiCanonicalName
    naa.60123456789abcdef0123456789abcde
    DeviceName
    vml.020000000060123456789abcdef0123456789abcde1234567890ab

    If you need to save the output to a file the command can be modified:

    Get-VM | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName | fl | Out-File –FilePath RDM-list.txt
     
  3. Identify the backing SCSI device from either the ScsiCanonicalName or DeviceName identifiers. For more information, see Identifying disks when working with VMware ESX (1014953).

Tags

identify-virtual-machine

See Also

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 18 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 18 Ratings
Actions
KB: