Category Archives: ESXI 4.1

VMware – Attaching iSCSI disks to an ESXi 4 server

VMware – Attaching iSCSI disks to an ESXi 4 server

Introduction

This article explains how to attach an iSCSI disk to a VMware ESXi 4 server.

The infrastructure used for this article is an Openfiler 2.3 server configured as an iSCSI Target Server with a single NIC to connect to the Internal LAN and provide iSCSI connectivity also.

Enabling the iSCSI storage adapter

The iSCSI storage adapter in ESXi comes as part of the standard installation but is disabled by default.  To enable the adapter perform the following steps :-

  1. Open the vSphere client and connect to the ESXi host
  2. Click on the Configuration tab and then click on Storage Adapters in the Hardware section
  3. Highlight the iSCSI software adapter and select Properties.
  4. Click on the configure button, tick Enabled and then click on OK.

Adding a send target server

Once the iSCSI software adapter is enabled perform the following steps within the adapters Properties :-

  1. Click on the Dynamic Discovery tab
  2. Click on the Add button
  3. When prompted enter in the IP address of the iSCSI target server and click on OK.
  4. When prompted to re-scan the host select Yes.
  5. Once the re-scan has completed the iSCSI LUN’s which are available on the iSCSI target server appear.

Assigning an iSCSI LUN as a datastore

One way to present an iSCSI LUN(s) for use by a guest is to create it as a datastore.  To create a datastore for an iSCSI disk resource perform the following steps :-

  1. In the vSphere Client click on the Configuration tab.
  2. Select Storage from the Hardware section and then click on the Add Storage link
  3. When prompted select the Disk/LUN option and click on Next
  4. You will be presented with a list of available LUN’s which the ESXi server can see.
  5. Select the desired LUN and then click on Next
  6. At the current disk layout screen click on Next when prompted to create a new partition
  7. Enter the desired Datastore name and then click on continue
  8. Configure the Block Size to the desired setting and then click on Next and then Finish to create the Datastore

Assigning an iSCSI LUN to a virtual machine

It is also possible to directly assign a LUN to a virtual machine as either part of the creation of the guest or as an additional disk.  The following sections provide information on how to perform either of these methods to add a LUN to a virtual machine.

Assigning a LUN during virtual machine creation

To assign a LUN to a virtual machine during its creation perform the following steps :-

  1. Click on the Create a new virtual machine option
  2. Select a Custom configuration and then click on Next
  3. When prompted set the Virtual Machine name as desired and then click on Next
  4. Set the datastore to be used as desired and then click on Next
  5. Select the Virtual Machine Version required (Either v4 or v7 depending on your requirements) and then clcik on Next
  6. Select the Guest Operating System required and then click on Next
  7. Configure the amount of Memory you wish to assign and then click on Next
  8. Assign the amount of Network Cards you require and the pertinent Networks to connect them to and then click on Next
  9. Select the LSI Logic Parallel SCSI controller and then click on Next
  10. Select the Raw Device Mappings option for the disk and then click on Next
  11. Select the desired LUN from the list to assign to the Virtual Machine and then click on Next
  12. When prompted for where to store the LUN mapping select Store with Virtual Machine and then click on Next
  13. Select whether the LUN is presented to the Virtual Machine as a Physical or Virtual and then click on Next
  14. Configure the Virtual Device Node SCSI ID as desired and then click on Next
  15. Click on Finish to create the new Virtual Machine

Assigning a LUN as an additional disk for a virtual machine

To assign as LUN as an additional disk on a virtual machine perform the following steps :-

  1. Edit the virtual machine’s Properties and click on the Add button
  2. Select Hard Disk from the list of devices and then click on Next
  3. Select Raw Device Mappings for the disk type and then click on Next
  4. Select the desired LUN from the list to assign to the Virtual Machine and then click on Next
  5. When prompted for where to store the LUN mapping select Store with Virtual Machine and then click on Next
  6. Select whether the LUN is presented to the Virtual Machine as a Physical or Virtual and then click on Next
  7. Configure the Virtual Device Node SCSI ID as desired and then click on Next
  8. Click on Finish to add the new Hard Disk device to the Virtual Machine