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.

N Port ID Virtualization 1

Uncheck Temporary disable NPIV for this virtual machine and select Generate new WWNs.

N Port ID Virtualization 2

Click OK and virtual WWNs will be generated. If you edit VM settings WWNs will be present.

N Port ID Virtualization 3

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.

N Port ID Virtualization 4

Select available LUN.

N Port ID Virtualization 5

When a disk is added to VM you can change multipathing policy for the disk.

N Port ID Virtualization 6

Round Robin

N Port ID Virtualization 7

Most Recently Used

N Port ID Virtualization 8

Fixed (VMware)

N Port ID Virtualization 9

On the VM itself, you see that LUN was detected.

N Port ID Virtualization 10


How to configure N-Port ID Virtualization on VMware ESXi
Rate this post
Wojciech Marusiak
Social Media

Wojciech Marusiak

Senior Consultant at VMware Global, Inc.
I am innovative and experienced VMware and Windows Server Engineer with over 10 years in the IT industry specializing in VMware virtualization and Microsoft Server environment.

My experience and skills have been proven by leading vendor certifications like VMware Certified Implementation Expert 6 – Data Center Virtualization, VMware Certified Advanced Professional 6 – Data Center Virtualization Design, VMware Certified Professional 6 - Data Center Virtualization, VMware Certified Professional 6 - Network Virtualization, AWS Certified Solutions Architect - Associate, ITIL V3, VMware vExpert 2014 - 2017 and VMware vExpert NSX 2017 Award.

My blog wojcieh.net - was voted #43 in Top vBlog 2017 contest!
Wojciech Marusiak
Social Media

Latest posts by Wojciech Marusiak (see all)