Working with Raw Device Mappings

A Raw Device Mapping (RDM) is a storage device that is presented directly to a virtual machine. RDMs are available in two compatibility modes: physical and virtual. The most important difference is that virtual compatibility mode RDMs can be a part of a VMware vSphere snapshot. Snapshots of a physical compatibility mode RDM can only be taken on the storage array.

There are some use cases for RDMs. The most common use case is the quorum disk in a Microsoft Windows cluster. A quorum disk must be in physical compatibility mode.

Note

For more information about using Microsoft Windows Clusters on VMware vSphere, you should read the Setup for Failover Clustering and Microsoft Cluster Service guide. You can find this guide on https://www.vmware.com/support/pubs/ . VMware Knowledge base article 1037959: Guidelines for Microsoft Clustering on vSphere can be found at http://kb.vmware.com/kb/1037959 .

To add RDM to a virtual machine, you can use the New-Harddisk cmdlet. You have already seen the syntax of this cmdlet in Chapter 5, Managing Virtual Machines with PowerCLI . The value of the -DiskType parameter specifies what type of disk it will be. The valid values are:

  • rawVirtual
  • rawPhysical
  • flat
  • unknown

You also need to specify a value for the New-Harddisk -DeviceName parameter. You can retrieve the device name with the Get-ScsiLun cmdlet. In the following example, we will retrieve all the LUNs of host 192.168.0.133 and display the CanonicalName and ConsoleDeviceName properties:

PowerCLI C:> Get-VMHost -Name 192.168.0.133 | Get-ScsiLun |
>> Select-Object -Property CanonicalName,ConsoleDeviceName


    CanonicalName   ConsoleDeviceName
-------------   -----------------
naa.50014381... /vmfs/devices/genscsi/naa.5001438109cfcd00
naa.600a0b80... /vmfs/devices/disks/
                    naa.600a0b80001111550000b6182ca14450
naa.600a0b80... /vmfs/devices/disks/
                    naa.600a0b80001111550000f35b93e19350
naa.600a0b80... /vmfs/devices/disks/
                    naa.600a0b80001111550000a8adc7e19350
naa.600a0b80... /vmfs/devices/disks/
                    naa.600a0b80001111550000893247e29350
naa.600a0b80... /vmfs/devices/disks/
                    naa.600a0b80001111550000d2c418e29350

In the following example, we will add a physical RDM to virtual machine VM2:

PowerCLI C:> New-HardDisk -VM VM2 -DiskType RawPhysical
    -DeviceName /vmfs/devices/disks/naa.600a0b80001111550000893247e29350


    CapacityGB Persistence          Filename
---------- -----------          --------
500.000    IndependentPersis... [Cluster01_Vmfs01] VM2/VM2_1.vmdk
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.251.154