How to Connect and Configure Virtual Fibre Channel, FC Storage and FC Tape Library from within a Virtual Machine in Hyper-v Server 2012 R2

Windows Server 2012 R2 with Hyper-v Role provides Fibre Channel ports within the guest operating system, which allows you to connect to Fibre Channel directly from within virtual machines. This feature enables you to virtualize workloads that use direct FC storage and also allows you to cluster guest operating systems leveraging Fibre Channel, and provides an important new storage option for servers hosted in your virtual infrastructure.


  • Existing Fibre Channel investments to support virtualized workloads.
  • Connect Fibre Channel Tape Library from within a guest operating systems.
  • Support for many related features, such as virtual SANs, live migration, and MPIO.
  • Create MSCS Cluster of guest operating systems in Hyper-v Cluster


  • Live Migration will not work if SAN zoning isn’t configured correctly.
  • Live Migration will not work if LUN mismatch detected by Hyper-v cluster.
  • Virtual workload is tied with a single Hyper-v Host making it a single point of failure if a single HBA is used.
  • Virtual Fibre Channel logical units cannot be used as boot media.


  • Windows Server 2012 or 2012 R2 with the Hyper-V role.
  • Hyper-V requires a computer with processor support for hardware virtualization. See details in BIOS setup of server hardware.
  • A computer with one or more Fibre Channel host bus adapters (HBAs) that have an updated HBA driver that supports virtual Fibre Channel.
  • An NPIV-enabled Fabric, HBA and FC SAN. Almost all new generation brocade fabric and storage support this feature.NPIV is disabled in HBA by default.
  • Virtual machines configured to use a virtual Fibre Channel adapter, which must use Windows Server 2008, Windows Server 2008 R2, or Windows Server 2012 or Windows Server 2012 R2 as the guest operating system. Maximum 4 vFC ports are supported in guest OS.
  • Storage accessed through a virtual Fibre Channel supports devices that present logical units.
  • MPIO Feature installed in Windows Server.
  • Microsoft Hotfix KB2894032

Before I begin elaborating steps involve in configuring virtual fibre channel. I assume you have physical connectivity and physical multipath is configured and connected as per vendor best practice. In this example configuration, I will be presenting storage and FC Tape Library to virtualized Backup Server. I used the following hardware.

  • 2X Brocade 300 series Fabric
  • 1X FC SAN
  • 1X FC Tape Library
  • 2X Windows Server 2012 R2 with Hyper-v Role installed and configured as a cluster. Each host connected to two Fabric using dual HBA port.

Step1: Update Firmware of all Fabric.

Use this LINK to update firmware.

Step2: Update Firmware of FC SAN

See OEM or vendor installation guide. See this LINK for IBM guide.

Step3: Enable hardware virtualization in Server BIOS

See OEM or Vendor Guidelines

Step4: Update Firmware of Server

See OEM or Vendor Guidelines. See Example of Dell Firmware Upgrade

Step5: Install MPIO driver in Hyper-v Host

See OEM or Vendor Guidelines

Step6: Physically Connect FC Tape Library, FC Storage and Servers to correct FC Zone

Step7: Configure Correct Zone and NPIV in Fabric

SSH to Fabric and Type the following command to verify NPIV.

Fabric:root>portcfgshow 0

If NPIV is enabled, it will show NPIV ON.

To enable NPIV on a specific port type portCfgNPIVPort 0 1  (where 0 is the port number and 1 is the mode 1=enable, 0=disable)

Open Brocade Fabric, Configure Alias. Red marked are Virtual HBA and FC Tape shown in Fabric. Note that you must place FC Tape, Hyper-v Host(s), Virtual Machine and FC SAN in the same zone otherwise it will not work.


Configure correct Zone as shown below.


Configure correct Zone Config as shown below.


Once you configured correct Zone in Fabric, you will see FC Tape showing in Windows Server 2012 R2 where Hyper-v Role is installed. Do not update tape driver in Hyper-v host as we will use guest or virtual machine as backup server where correct tape driver is needed. 


Step8: Configure Virtual Fibre Channel

Open Hyper-v Manager, Click Virtual SAN Manager>Create new Fibre Channel


Type Name of the Fibre Channel> Apply>Ok.


Repeat the process to create multiple VFC for MPIO and Live Migration purpose. Remember Physical HBA must be connected to 2 Brocade Fabric.

On the vFC configuration, keep naming convention identical on both host. If you have two physical HBA, configure two vFC in Hyper-v Host. Example: VFC1 and VFC2. Create two VFC in another host with identical Name VFC1 and VFC2. Assign both VFC to virtual machines.

Step9: Attach Virtual Fibre Channel Adapter on to virtual Machine.

Open Failover Cluster Manager,  Select the virtual machine where FC Tape will be visible>Shutdown the Virtual machine.

Go to Settings of the virtual machine>Add Fibre Channel Adapter>Apply>Ok.


Record WWPN from the Virtual Fibre Channel.


Power on the virtual Machine.

Repeat the process to add multiple VFCs which are VFC1 and VFC2 to virtual machine.

Step10: Present Storage

Log on FC storage>Add Host in the storage. WWPN shown here must match the WWPN in the virtual fibre channel adapter.


Map the volume or LUN to the virtual server.


Step11: Install MPIO Driver in Guest Operating Systems

Open Server Manager>Add Role & Feature>Add MPIO Feature.


Download manufacturer MPIO driver for the storage. MPIO driver must be correct version and latest to function correctly.


Now you have FC SAN in your virtual machine



Step12: Install Correct FC Tape Library Driver in Guest Operating Systems.

Download and install correct FC Tape driver and install the driver into the virtual backup server.

Now you have correct FC Tape library in virtual machine.


Backup software can see Tape Library and inventory tapes.


Further Readings:

Brocade Fabric with Virtual FC in Hyper-v

Hyper-V Virtual Fibre Channel Overview

Clustered virtual machine cannot access LUNs over a Synthetic Fibre Channel after you perform live migration on Windows Server 2012 or Windows Server 2012 R2-based Hyper-V hosts

About Raihan Al-Beruni

My Name is Raihan Al-Beruni. I am working as an Infrastructure Architect in Data Center Technologies in Perth, Western Australia. I have been working on Microsoft technologies for more than 15 years. Other than Microsoft technologies I also work on Citrix validated solution and VMware data center virtualization technologies. I have a Masters degree in E-Commerce. I am certified in Microsoft, VMware, ITIL and EMC. My core focus is on cloud technologies. In my blog I share my knowledge and experience to enrich information technology community as a whole. I hope my contribution through this blog will help someone who wants more information on data center technologies.
This entry was posted in Virtualization and tagged , , , , , , , , , , , , , , , , . Bookmark the permalink.

17 Responses to How to Connect and Configure Virtual Fibre Channel, FC Storage and FC Tape Library from within a Virtual Machine in Hyper-v Server 2012 R2

  1. Gustavo says:

    Hyper-V Guest VM´s Live Migration works in IBM PurSystem, just disable Offload data transfer and little more, you must have to correctly create a zoning into the two FC Switches and put 2 FC NICs into VMs and assign to FC vSwitch one WWPN to one vFC Switch and another WWPN to last vFC Switch. beleave me. Its works.
    Into the storage v3700 or V7000 must assign manually the WWPN (B) of each vFC NIC for live migration works. Its always shows as degradate or (x) Red, until VMs live migrate and another vFC Switch lets inform this WWPN (B) into the zoning. Sorry for my english, i am from latin america, most precisely Argentina, and mi native language is spanish.


  2. Tim Robertson says:

    Hi There, I have run into an issue getting my Tape library working over VFC.

    I have the following hardware:
    • Dell R710
    o Server 2012 R2 (Hyper-V Role)
    o Guest: Server 2008 R2
     Backup Software = Symantec Backup Exec (Trial only – evaluating the product before purchase)
     MPIO feature is installed
     Drivers for tape library and LTO drives are latest available.
    o QLOGIC QLE2462 Dual Port 4GB Fiber Card
     Hyper-V Virtual Fiber enabled and two vFNIC’s assigned to GUEST
    • Brocade 200E 4GB Fiber Switch
    o Fabric OS v5.3.2c
    o Virtual Fiber (NPIV) is enabled
    o Zone created containing the two virtual WWN’s and the 3 LTO drive WWN’s
    • HP MSL8096 Tape Library
    o 3x HP Ultrium 1840 LTO4 4GB FIber tape drives
     Drive and library firmware is all up-to-date.

    My Issue:
    I can see the tape library (media changer) and drives in Device Manager on the GUEST system. Symantec Backup Exec sees the tape library and drives as well. I have successfully initialized and scanned the tape library through Backup Exec. Upon issuing an inventory, catalogue or backup job however the robot loads a tape into the tape drive and the drive spins up and begins to read, immediately following this the job fails with the error that the library reported a physical problem (robot stuck or tape library offline) and sets the library and drives to offline.

    Now you might read this and think “well you need to contact Symantec support” but I then moved to try the same operations on a second server by backing up and restoring the VM onto a spare physical box and all jobs proceeded normally and worked!!!

    HP Tape Library and Tools also reports an issue when ran form the GUEST VM “communication with Drive # was lost, the drive may be offline”. The only time the problem occurs is when the data path leads through the virtual fiber.

    Any ideas would be appreciated?



    • Do you see correct library on the backup exec software? Did you turn on live migration on this backup server. If you so please turn of live migration for backup server and test again. Do you have any fibre channel connectivity issue with Hyper-v Host and Tape Library. run firmware update on all hosts. Make sure host itself see the tape library before guest can see the library. Update backup exec to latest. Install tape library driver into guest OS. Make sure tape isnt locked. Manually run an inventory from the administrative console of tape library and check tape are discovered correctly. I ran into same problem as you experiencing now. My tape was locked and stuck into tape. I had to update the firmware of tape library and reboot twice to make it work. Good luck.


      • Tim Robertson says:

        Hi Raihan,

        Yes I see the correct tape library and all 3 drives in Backup Exec.
        Live migration is disabled for this server as I only have a single host.

        Ran firmware updates and patched to latest version of BIOS, DELL Controllers and iDRAC. Also updated firmware of QLOGIC fiber card to latest. HP Library and Drives are all at latest firmware. Only hardware not on latest firmware is Brocade 200E fiber switch as it refuses to upgrade from v5.3.2c to v6.0.1a (it requests downgrade to 5.0.0, which according to Brocade upgrade path for 200E switch should not happen).

        Updated Backup Exec, ran all Windows Updates on both the HOST and GUEST. Installed tape library driver into GUEST (tried both the HP drivers as well as the Symantec and Microsoft drivers as per Symantec’s tech support recommendation).

        Tape is definitely not locked, have tried SONY, HP and Tandberg tapes and found none were successful. Tested on a separate physical server by restoring the GUEST onto the physical machine and re-tested over fiber connection and was able to run backups and inventory successfully using both HP and Symantec Drivers.

        Tested connection from Host to Tape library and drives using HP Library & Tape Tools and all tests passed. Re-ran the same test from within the GUEST VM (Server 2008 R2 Standard with all updates completed) and it errored out saying saying that there is no media in the driver half way through the test.

        I am re-building the VM from a clean install at the moment, will report back if that fixes it.
        Any other suggestions are appreciated???!!!



      • Tim Robertson says:

        Hi Raihan,

        After rebuilding the VM from a clean install of Server 2008 R2 with SP1, I proceeded to do all windows updates, add the virtual fiber NIC, update zoning in my brocade switch (allowing the VM to see the tape drives and library).

        Next I installed HP Tape Library and Drivers for Server 2008 R2 (x64) relevant to my library and drives. I then installed HP Library and Tape Tools (service then WebGUI) and ran a drive performance test using a base line then 3 levels of compression.

        Approximately half way through the test it fails (after having already written and read from RAW and 1.6:1 compression tests) with the following error “read operation failed with the OS error – 121 the semaphore timeout period has expired”.

        Any ideahs? this one has truly got me stumped.



      • Tim Robertson says:

        Hi Raihan,

        I have also now ran the same tests from a different VM running Server 2012 R2 Standard as GUEST OS. Same error occurs “read operation failed with the OS error – 121 the semaphore timeout period has expired”.



      • Here is a solution for this one
        I am sure this is environment specific error. It is related to your configuration and build of OS & DB.


  3. André says:

    I tried this setup about a year ago with a HP MSL 6480 library / DPM 2012 R2. Didn’t work. The drive communication seemed to work fine, but the library communication was messed up. Contacted MS Product support, and they told me that the ONLY tape library that was working as expected over virtual fibre channel was a _virtual_ tape library. (Disk system pretending to be a tape library) HP Tape tools seemed to work ok, but i’m guessing the tool might talk to the library over ethernet instead of FC.


    • I have tested my article on IBM and Cisco Server with brocade fabric and brocade HBA. It works perfect for me. You have to turn on NPIV on fabric before it can work correctly.


      • Tim Robertson says:

        Hi All,

        I have given up getting this to work for my environment, I was able to test at work with our MSL2024 Libraries with LTO6 FC drives and they worked exactly as expected.

        Appears to be an issue wherein the LTO4 FC tape drives don’t understand where to send the data back to once its received, IE it receives a command and actions it but then doesn’t know where to send the results of the action back and so the backup server thinks the library has gone offline as it times out from lack of response.

        The LTO6 FC drives have native NPIV support whereas the LTO4 appears not too, even though the Fabric and HBA supported it, it would seem without support on the drive its not going to work period.

        Tim Robertson


      • Hi Tim,

        LTO4 is out of scope. It won’t work. If client can buy FC Fabric and SAN than they can afford to buy a new Tape Library that support NPIV otherwise no point to spend time.


  4. Tim Robertson says:

    To continue your above discussion, In my humble opinion, I don’t believe it is out of scope.

    One of the benefits from your article was “Existing Fibre Channel investments to support virtualized workloads.” that being the case we are talking about company’s who have an existing fibre channel SAN and Tape setup not just people who are buying all new hardware.

    That being the case I would like to ask that for future readers of your thread that you mention that NPIV is supported only on LTO5/6 FC Tape Drives? This would just give even more information to other readers of your blog!



    • Agreed. This bring another question “product life cycle management”. I always find client wants to utilise their on premises hardware until they die. Since IT is the first department in any organisation face budget cut. It’s challenge for CIO to priorities business requirement rather than wish list of system admin. Hence product life cycle goes bottom of the list. Thanks for your input.


  5. Edwin P. says:

    Hello, I understand that FC Tapes are not supported yet, according to

    Storage that is accessed through a virtual Fibre Channel adapter supports devices that present logical unit numbers. Virtual Fibre Channel LUNs cannot be used as boot media. Fibre Channel tape devices are not supported.

    We tried a lot, but FC tapes didn’t work correctly.


  6. You can purchase any fibre channel capable tape library which will be able to handle virtual FC. Connect fibre channel tape to fabric and include into the same zone and hyper-v thats all.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s