Connecting an ESXi virtualization host to an iSCSI SAN

Storing VMs on an ESXi virtualization host? That’s a rookie mistake. Instead, connect an ESXi virtualization host to an iSCSI SAN to protect VMs from a host failure.

This series explains how to build a free VMware virtualization environment. Part one discusses the VMware vSphere...

Hypervisor and vSphere Client installation process. The second installment covers how to manage a virtual infrastructure with the vSphere Client. This tip discusses how to connect an ESXi virtualization host to an iSCSI storage area network (SAN) to store virtual machines.

By default, virtual machines (VMs) are saved to an ESXi host’s local storage. Even in small environments, this configuration is not recommended, because a problem with the ESXi virtualization host can take the VMs offline, as well.

When possible, it’s best to separate the host from the disk files. One option is to connect an ESXi host to an iSCSI SAN.

Connecting the ESXi virtualization host to the iSCSI SAN

From the vSphere Client log-in interface, connect to an ESXi virtualization host and select the Configuration tab, which displays the current storage arrangement. (In an ESXi configuration, it’s typically the host’s local disk.)

Figure 1
After installing ESXi, the host’s local hard disk is configured as the default storage device. (Click image for an enlarged view.)

Next, set up the iSCSI storage adapter:

  1. In the Configuration tab, select Storage Adapters for a list of the known storage adapters for the ESXi virtualization host.
  1. Select a storage adapter and click Properties.

Figure 2
The storage adapter properties provide specific parameters for the adapter.(Click image for an enlarged view.)

  1. To configure iSCSI storage, click the Configure button in the General tab. The General Properties window will open. From here, make sure the status is set to Enabled and click OK to save your changes.

An iSCSI name will generate automatically. You’ll need this name to authorize the iSCSI initiator server and access a specific iSCSI logical unit number (LUN) on the SAN.

  1. After enabling the iSCSI initiator, activate either the Dynamic Discovery or Static Discovery tab. Dynamic Discovery automatically searches for storage, while Static Discovery searches based on parameters entered by the administrator. It is good practice to start the discovery procedure on the Dynamic Discovery tab and manage existing iSCSI connections on the Static Discovery tab.

From the Dynamic Discovery tab, click Add to find a new iSCSI connection. The Add Send Target Server window will open. Enter the IP address and port of the iSCSI target server.

  1. You can verify that the iSCSI targets were added on the Static Discovery tab. Below is an example of a successful connection.

Figure 3
After making a successful connection, you'll see the iSCSI targets from the Static Discovery tab.(Click image for an enlarged view.)

  1. After hitting OK to close, click Yes to perform a recommended rescan of the host bus adapter.

Adding new storage to the ESXi virtualization host

To add new storage, open the Add Storage link, located into the upper-right corner of the Storage tab. Next, select Add Storage.

Figure 4
From Add Storage, you can easily configure access to either a SAN or a Network File System.(Click image for an enlarged view.)

After selecting Disk/LUN, your iSCSI disk will appear automatically. Select the disk and click Next. You’ll see an overview of the current disk layout and how ESXi will add the disk to the infrastructure. There's nothing to change on this tab, so click Next. In the following tab, enter a data store name and click Next again.

Now specify the maximum file size from the drop-down list, which provides values, such as “256 GB, block size: 1 MB.” (In other words, to create files with a maximum size of 256 GB, you need a block size of 1 MB.) The block size is also the minimum file size, so don't make the block size too large.

Figure 5
The block size is also the minimum amount of disk space used by a file.(Click image for an enlarged view.)

Next, you'll see the Ready to Complete window, which is an overview of all the settings. If you're happy with these settings, click Finish to add the LUN to the data store. If all goes well, it will appear immediately on the Configuration tab. Click on the LUN from this tab to view some of its detailed properties.

Figure 6
A new iSCSI device is immediately shown on the Configuration tab.(Click image for an enlarged view.)

Stay tuned for the next installment of this series, which covers ESXi networking.

More on ESXi virtualization hosts and storage

  • VSphere iSCSI initiator authentication changes
  • EMC Storage Viewer: Integrating storage array views

Dig Deeper on Selecting storage and hardware for VMware environments