Enterprise storage infrastructures rely heavily on Fibre Channel Storage Area Networks (SANs) to deliver dedicated, non-blocking, multi-gigabit block storage to critical database clusters and virtualization hosts. In enterprise Hyper-V deployments, workloads often require direct, unmediated communication with physical storage arrays—such as accessing raw LUNs directly from inside a virtual machine guest, implementing guest-level clustering, or using native storage management software. Hyper-V satisfies this architecture through Virtual Fibre Channel, which utilizes N_Port ID Virtualization (NPIV) to expose virtual Host Bus Adapters (vHBAs) directly into guest virtual machines. By using PowerShell cmdlets such as New-VMSan and Add-VMFibreChannelHba, system administrators can configure virtual SAN fabrics and assign deterministic WWN pairs on Windows 11 Hyper-V hosts.
Understanding Virtual Fibre Channel and NPIV Architecture
Virtual Fibre Channel operates by virtualizing physical Fibre Channel Host Bus Adapter (HBA) ports on the host system:
- N_Port ID Virtualization (NPIV): A Fibre Channel standard that allows a single physical Fibre Channel port to register multiple distinct virtual World Wide Port Names (WWPNs) on a SAN fabric switch.
- Virtual SAN (vSAN): A logical grouping of one or more physical Fibre Channel HBA ports configured on the Hyper-V host, representing a named connection to a physical SAN fabric (e.g. Fabric A and Fabric B for dual-path redundancy).
- Dual WWPN Pairs: Each virtual Fibre Channel adapter is provisioned with two WWPNs (Set A and Set B). Hyper-V automatically alternates between these identifiers during live migrations, ensuring storage connectivity is maintained without dropped I/O frames.
Auditing Host Physical Fibre Channel HBAs and SAN Fabrics
Before configuring virtual adapters, ensure your host machine is equipped with physical Fibre Channel HBAs that support NPIV. Open an elevated PowerShell session to query the host storage environment.
To inspect physical Fibre Channel ports detected by Windows:
Get-InitiatorPort | Where-Object { $_.ConnectionType -eq "Fibre Channel" } |
Select-Object NodeAddress, PortAddress, ConnectionType, OperationalStatus
To query existing Virtual SAN configurations on the Hyper-V host:
Get-VMSan | Format-List
If no Virtual SAN exists, you must define one before virtual machines can bind to the physical fabric.
Creating a New Virtual SAN on the Hyper-V Host
To establish a Virtual SAN that binds physical HBA ports to a named fabric network, use New-VMSan.
To create a virtual SAN named ProductionFabricA using a specific physical WWPN:
# Create Virtual SAN fabric definition
New-VMSan -Name "ProductionFabricA" -HostHbaNodeAndPortNames @(
"20:00:00:25:B5:11:AA:01,20:00:00:25:B5:22:AA:01"
)
To verify that the Virtual SAN is active and bound to the host ports:
Get-VMSan -Name "ProductionFabricA" | Select-Object Name, HostHbaNodeAndPortNames
For high-availability configurations, create a second Virtual SAN (e.g. ProductionFabricB) bound to a secondary physical HBA card to provide redundant Multipath I/O (MPIO) paths.
Adding a Virtual Fibre Channel Adapter to a Virtual Machine
Virtual Fibre Channel adapters can be attached to Generation 1 or Generation 2 virtual machines. The virtual machine must be powered off to add or modify virtual HBA hardware.
To add a virtual Fibre Channel adapter attached to ProductionFabricA:
# Stop the virtual machine
Stop-VM -Name "SQLClusterNode01" -Force
# Attach the virtual Fibre Channel HBA
Add-VMFibreChannelHba -VMName "SQLClusterNode01" -SanName "ProductionFabricA"
# Verify attachment and retrieve generated WWN sets
Get-VMFibreChannelHba -VMName "SQLClusterNode01" |
Select-Object VMName, SanName, WorldWideNodeNameSetA, WorldWidePortNameSetA, WorldWideNodeNameSetB, WorldWidePortNameSetB |
Format-List
Zoning Storage Fabrics and Registering LUN Masking
To grant the guest virtual machine access to SAN storage LUNs, the storage administrator must configure zoning on physical SAN switches (such as Brocade or Cisco MDS):
- Retrieve both
WorldWidePortNameSetAandWorldWidePortNameSetBfrom the output ofGet-VMFibreChannelHba. - Create a zone on the physical Fibre Channel switch containing the target SAN storage array target ports and both virtual WWPNs (Set A and Set B).
- On the storage array management console, configure LUN masking to grant read/write access to both WWPNs.
Because both WWPNs are zoned into the fabric, Hyper-V can seamlessly switch between Set A and Set B during host maintenance operations without dropping active database connections.
Configuring Multipath I/O (MPIO) Inside the Guest VM
For mission-critical enterprise workloads, attach two independent virtual Fibre Channel adapters to separate fabrics and configure MPIO inside the guest OS:
# Attach second vHBA to Fabric B
Add-VMFibreChannelHba -VMName "SQLClusterNode01" -SanName "ProductionFabricB"
# Start the virtual machine
Start-VM -Name "SQLClusterNode01"
Inside the guest operating system:
- Install the Multipath I/O feature:
Enable-WindowsOptionalFeature -Online -FeatureName MultipathIO - Enable automatic claiming of Fibre Channel devices:
Enable-MSDSMAutomaticClaim -BusType FC - Reboot the guest to finalize multi-path failover routing across fabrics.
Removing a Virtual Fibre Channel Adapter
When storage migrations or testing conclude, remove the virtual HBA from the virtual machine:
Stop-VM -Name "SQLClusterNode01" -Force
# Remove the virtual Fibre Channel HBA
Remove-VMFibreChannelHba -VMName "SQLClusterNode01" -SanName "ProductionFabricA"
Start-VM -Name "SQLClusterNode01"
Configuring Hyper-V Virtual Fibre Channel adapters via PowerShell unlocks native, hardware-level enterprise SAN integration on Windows 11, delivering deterministic low-latency block storage for demanding database and guest clustering environments.