When you create a virtual machine, a default virtual hard disk is added. You can add another hard disk if you run out of disk space, if you want to add a boot disk, or for other file management purposes. When you add a hard disk to a virtual machine, you can create a virtual disk, add an existing virtual disk, or add a mapped SAN LUN.

When you add a hard disk to a virtual machine, you can create a virtual disk, add an existing virtual disk, or add a mapped SAN LUN.

You can add a virtual hard disk to a virtual machine before or after you add a SCSI or SATA storage controller. The new disk is assigned to the first available virtual device node on the default controller, for example (0:1). Only device nodes for the default controller are available unless you add additional controllers.

The following ways to add disks can help you plan your disk configuration. These approaches show how you can optimize controller and virtual device nodes for different disks. For storage controller limitations, maximums, and virtual device node behavior, see SCSI, SATA, and NVMe Storage Controller Conditions, Limitations, and Compatibility.
Add an existing hard disk that is configured as a boot disk during virtual machine creation.
To ensure that the virtual machine can boot, remove the existing disk before you add the boot disk. After you add a new hard disk to the virtual machine, you might need to go into the BIOS setup to ensure that the disk you were using to boot the virtual machine is still selected as the boot disk. You can avoid this problem by not mixing adapter types, and by using device node 0 on the first adapter as the boot disk.
Keep the default boot disk and add a new disk during virtual machine creation.
The new disk is assigned to the next available virtual device node, for example (0:1) You can add a new controller and assign the disk to a virtual device node on that controller, for example (1:0) or (1:1).
Add multiple hard disks to an existing virtual machine.
If you add multiple hard disks to a virtual machine, you can assign them to several SCSI or SATA controllers to improve performance. The controller must be available before you can select a virtual device node. For example, if you add controllers 1, 2, and 3, and add four hard disks, you might assign the fourth disk to virtual device node (3:1).

Add a New Hard Disk to a Virtual Machine

You can add a virtual hard disk to an existing virtual machine, or you can add a hard disk when you customize the virtual machine hardware during the virtual machine creation process. For example, you might need to provide additional disk space for an existing virtual machine with a heavy work load. During virtual machine creation, you might want to add a hard disk that is preconfigured as a boot disk.

During virtual machine creation, a hard disk and a SCSI or SATA controller are added to the virtual machine by default, based on the guest operating system that you select. If this disk does not meet your needs, you can remove it and add a new hard disk at the end of the creation process.

If you add multiple hard disks to a virtual machine, you can assign them to several controllers to improve performance. For controller and bus node behavior, see SCSI, SATA, and NVMe Storage Controller Conditions, Limitations, and Compatibility.

Prerequisites

Procedure

  1. Right-click a virtual machine in the inventory and select Edit Settings.
  2. On the Virtual Hardware tab, click the Add New Device button.
  3. Select Hard Disk from the drop-down menu.
    The hard disk appears in the Virtual Hardware devices list.
    Note: If the host where the virtual machine resides has available PMem resources, you can place the new hard drive on the host-local PMem datastore.
  4. Expand New hard disk and customize the settings of the new hard disk.
    1. Enter a size for the hard disk and select the unit from the drop-down menu.
    2. From the VM storage policy, select a storage policy or leave the default one.
    3. From the Location drop-down menu, select the datastore location where you want to store virtual machine files.
    4. From the Disk Provisioning drop-down menu, select the format for the hard disk.
      Option Action
      Same format as source Use the same format as the source virtual machine.
      Thick Provision Lazy Zeroed Create a virtual disk in a default thick format. Space required for the virtual disk is allocated during creation. Any data remaining on the physical device is not erased during creation, but is zeroed out on demand at a later time on first write from the virtual machine.
      Thick Provision Eager Zeroed Create a thick disk that supports clustering features such as Fault Tolerance. Space required for the virtual disk is allocated at creation time. In contrast to the thick provision lazy zeroed format, the data remaining on the physical device is zeroed out during creation. It might take longer to create disks in this format than to create other types of disks.
      Thin Provision Use the thin provisioned format. At first, a thin provisioned disk uses only as much datastore space as the disk initially needs. If the thin disk needs more space later, it can grow to the maximum capacity allocated to it.
    5. From the Shares drop-down menu, select a value for the shares to allocate to the virtual disk. Alternatively, you can select Custom and enter a value in the text box.
      Shares is a value that represents the relative metric for controlling disk bandwidth. The values Low, Normal, High, and Custom are compared to the sum of all shares of all virtual machines on the host.
    6. From the Limit - IOPs drop-down menu, customize the upper limit of storage resources to allocate to the virtual machine, or select Unlimited.
      This value is the upper limit of I/O operations per second allocated to the virtual disk.
    7. From the Disk Mode drop-down menu, select a disk 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 even if you revert a snapshot. When you power off or reset a virtual machine, the disk and all its snapshots are preserved.

      Independent - Nonpersistent

      Disks in nonpersistent mode behave like read-only disks. 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 the virtual machine, or when you delete a snapshot.

    8. From the Virtual Device Node, select a virtual device node or leave the default one.

      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 that is using a BusLogic controller with bus sharing turned on.

Add an Existing Hard Disk to a Virtual Machine

You can add an existing virtual hard disk to a virtual machine when you customize the virtual machine hardware during the virtual machine creation process or after the virtual machine is created. For example, you might want to add an existing hard disk that is preconfigured as a boot disk.

During virtual machine creation, a hard disk and a SCSI or SATA controller are added to the virtual machine by default, based on the guest operating system that you select. If this disk does not meet your needs, you can remove it and add an existing hard disk at the end of the creation process.

Prerequisites

Procedure

  1. Right-click a virtual machine in the inventory and select Edit Settings.
  2. (Optional) To delete the existing hard disk, move your pointer over the disk and click the Remove icon.
    The disk is removed from the virtual machine. If other virtual machines share the disk, the disk files are not deleted.
  3. On the Virtual Hardware tab, click the Add New Device button.
  4. Select Existing Hard Disk from the drop-down menu.
    The Select File dialog box opens.
  5. In the Select File, expand a datastore, select a virtual machine folder, and select the disk to add.
  6. Click OK.
    The disk file appears in the Contents column. The File Type drop-down menu shows the compatibility file types for this disk.
  7. (Optional) Expand New Hard disk and make further customizations for the hard disk.
  8. Click OK.

Add an RDM Disk to a Virtual Machine

You can use a raw device mapping (RDM) to store virtual machine data directly on a SAN LUN, instead of storing it in a virtual disk file. You can add an RDM disk to an existing virtual machine, or you can add the disk when you customize the virtual machine hardware during the virtual machine creation process.

When you give a virtual machine direct access to an RDM disk, you create a mapping file that resides on a VMFS datastore and points to the LUN. Although the mapping file has the same .vmdk extension as a regular virtual disk file, the mapping file contains only mapping information. The virtual disk data is stored directly on the LUN.

During virtual machine creation, a hard disk and a SCSI or SATA controller are added to the virtual machine by default, based on the guest operating system that you select. If this disk does not meet your needs, you can remove it and add an RDM disk at the end of the creation process.

Prerequisites

Procedure

  1. Right-click a virtual machine in the inventory and select Edit Settings.
  2. On the Virtual Hardware tab, click the Add New Device button and select RDM Disk from the drop-down menu.
    The Select Target LUN dialog box opens.
  3. In the Select Target LUN dialog box, select the target LUN for the raw device mapping and click OK.
    The disk appears in the virtual device list.
  4. Select the location for the mapping file.
    • To store the mapping file with the virtual machine configuration file, select Store with the virtual machine.
    • To select a location for the mapping file, select Browse and select the datastore location for the disk.
  5. 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 that 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.

  6. 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.

  7. (Optional) If you selected virtual compatibility mode, select a disk mode to change the way that disks are affected by snapshots.
    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 even if you revert a snapshot. When you power off or reset a virtual machine, the disk and all its snapshots are preserved.

    Independent - Nonpersistent

    Disks in nonpersistent mode behave like read-only disks. 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 the virtual machine, or when you delete a snapshot.

  8. Click OK.