During my study for VCAP5-DCA exam, i found one topic which I didn’t cover yet. It was NPIV. Luckily a colleague of mine from storage was as well curious to test it in real life scenario. We sat together and we implemented it in a test environment.
What is NPIV?
According to definition N-Port ID Virtualization is:
N- Port ID Virtualization (NPIV) is an ANSI T11 standard that describes how a single Fibre Channel HBA port can register with the fabric using several worldwide port names (WWPNs). This allows a fabric‐attached N‐port to claim multiple fabric addresses. Each address appears as a unique entity on the Fibre Channel fabric.
When N-Port ID Virtualization (NPIV) is used, a single FC HBA port (N-port) can register with the fabric by using several WWPNs. This method allows an N-port to claim multiple fabric addresses, each of which appears as a unique entity. When ESXi hosts use a SAN, these multiple, unique identifiers allow the assignment of WWNs to individual virtual machines as part of their configuration.
On VMware website N-Port ID Virtualization, you can find more detailed information about NPIV.
N-Port ID Virtualization requirements
The following requirements exist:
- NPIV can be used only for virtual machines with RDM disks. Virtual machines with regular virtual disks use the WWNs of the host’s physical HBAs.
- HBAs on your host must support NPIV.
- The switches in the fabric must be NPIV-aware.
- When configuring an LUN for NPIV access at the storage level, make sure that the NPIV LUN number and NPIV target ID match the physical LUN and Target ID.
- Use HBAs of the same type, either all QLogic or all Emulex. VMware does not support heterogeneous HBAs on the same host accessing the same LUNs.
- If a host uses multiple physical HBAs as paths to the storage, zone all physical paths to the virtual machine. This is required to support multipathing even though only one path at a time will be active.
- Make sure that physical HBAs on the host has access to all LUNs that are to be accessed by NPIV-enabled virtual machines running on that host.
How to configure NPIV?
Unfortunately, I will show you only VMware part of NPIV configuration because I don’t have access to storage part. Fortunately, a colleague of mine was as well interested in testing it and he covered storage part.
From VMware point of view, you need to create virtual WWN.
In order to do it power off VM edit configuration, go to **VM Options **and click Fibre CHannel NPIV.
Uncheck Temporary disable NPIV for this virtual machine and select Generate new WWNs.
Click OK and virtual WWNs will be generated. If you edit VM settings WWNs will be present.
Now you have to do zoning of storage to ESXi hosts and VM WWNs.
If everything is configured on storage/san side you should see empty LUN which can be assigned to a virtual machine. In order to use NPIV, you have to add RDM - Raw Device Mapping to VM.
Go to VM settings and click add RDM Disk.
Select available LUN.
When a disk is added to VM you can change multipathing policy for the disk.
Round Robin
Most Recently Used
Fixed (VMware)
On the VM itself, you see that LUN was detected.