You can store virtual machine data directly on a SAN LUN instead of storing it in a virtual disk file. This ability is useful if you are running applications in your virtual machines that must detect the physical characteristics of the storage device. Mapping a SAN LUN allows you to use existing SAN commands to manage storage for the disk.

About this task

When you map a LUN to a VMFS volume, vCenter Server creates a Raw Device Mapping (RDM) file that points to the raw LUN. Encapsulating disk information in a file allows vCenter Server to lock the LUN so that only one virtual machine can write to it at a time. For details about RDM, see the vSphere Storage documentation.

The RDM file has a .vmdk extension, but the file contains only disk information that describes the mapping to the LUN on the ESXi host. The actual data is stored on 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 you create the RDM, you specify the LUN to be mapped and the datastore on which to put the RDM.

Note:

You cannot deploy a virtual machine from a template and store its data on a LUN. You can only store its data in a virtual disk file.

Procedure

  1. On the Select a Disk page of the New Virtual Machine wizard, select Raw Device Mapping and click Next.
  2. From the list of SAN disks or LUNs, select a LUN for your virtual machine to access directly and click Next.
  3. Select a datastore for the LUN mapping file and click Next.

    You can place the RDM file on the same datastore where your virtual machine configuration file resides, or select a different datastore.

    Note:

    To use vMotion for virtual machines with enabled NPIV, make sure that the RDM files of the virtual machines are located on the same datastore. You cannot perform Storage vMotion or vMotion between datastores when NPIV is enabled.

  4. Select a compatibility mode and click Next.

    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 a snapshot, cloning, and so on. When you clone the disk or make a template from 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.

  5. Accept the default or select a different virtual device node.

    In most cases, you can accept the default device node. For a hard disk, a nondefault device node is useful to control the boot order or to have different SCSI controller types. For example, you might want to boot from an LSI Logic controller and share a data disk with another virtual machine using a BusLogic controller with bus sharing turned on.

  6. (Optional) : To change the way disks are affected by snapshots, click Independent and select an option.

    Option

    Description

    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.

  7. Click Next.

    Your changes are recorded and the Ready to Complete page opens.

What to do next

Review the virtual machine configuration.