When you give your vSphere virtual machine direct access to a raw SAN LUN, you create an RDM disk that resides on a VMFS datastore and points to the LUN. You can create the RDM as an initial disk for a new virtual machine or add it to an existing virtual machine. When creating the RDM, you specify the LUN to be mapped and the datastore on which to put the RDM.

Although the RDM disk file has the same .vmdk extension as a regular virtual disk file, the RDM contains only mapping information. The actual virtual disk data is stored directly on the LUN.

This procedure assumes that you are creating a new virtual machine. For information, see the vSphere Virtual Machine Administration documentation.

Procedure

  1. Create a virtual machine.
    1. Right-click any inventory object that is a valid parent object of a virtual machine, such as a data center, folder, cluster, resource pool, or host, and select New Virtual Machine.
    2. Select Create a new virtual machine and click Next.
    3. Follow the steps required to create a virtual machine.
  2. On the Customize Hardware page, click the Virtual Hardware tab.
  3. (Optional) To delete the default virtual hard disk that the system created for your virtual machine, move your cursor over the disk and click the Remove icon.
  4. Add an RDM disk.
    1. Click Add New Devices and select RDM Disk from the list.
    2. From the list of LUNs, select a target raw LUN and click OK.
      The system creates an RDM disk that maps your virtual machine to the target LUN. The RDM disk is shown on the list of virtual devices as a new hard disk.
  5. Configure the RDM disk.
    1. Click the New Hard Disk triangle to expand the properties for the RDM disk.
    2. Select a location for the RDM.
      You can place the RDM on the same datastore where your virtual machine configuration files reside, or select a different datastore.
      Note: To use vMotion for virtual machines with enabled NPIV, make sure that the RDM files and the virtual machine files are located on the same datastore. You cannot perform Storage vMotion when NPIV is enabled.
    3. Select a compatibility mode.
      Option Description
      Physical

      Allows the guest operating system to access the hardware directly. Physical compatibility is useful if you are using SAN-aware applications on the virtual machine. However, a virtual machine with a physical compatibility RDM cannot be cloned, made into a template, or migrated if the migration involves copying the disk.

      Virtual

      Allows the RDM to behave as if it were a virtual disk, so you can use such features as taking snapshots, cloning, and so on. When you clone the disk or make a template out of it, the contents of the LUN are copied into a .vmdk virtual disk file. When you migrate a virtual compatibility mode RDM, you can migrate the mapping file or copy the contents of the LUN into a virtual disk.

    4. If you selected virtual compatibility mode, select a disk mode.
      Disk modes are not available for RDM disks using physical compatibility mode.
      Option Description
      Dependent Dependent disks are included in snapshots.
      Independent - Persistent Disks in persistent mode behave like conventional disks on your physical computer. All data written to a disk in persistent mode are written permanently to the disk.
      Independent - Nonpersistent Changes to disks in nonpersistent mode are discarded when you power off or reset the virtual machine. With nonpersistent mode, you can restart the virtual machine with a virtual disk in the same state every time. Changes to the disk are written to and read from a redo log file that is deleted when you power off or reset.
  6. Complete your virtual machine configuration.