Q: With Windows Server 2012 R2 Hyper-V, what are my options for virtual machine (VM) shared storage in guest clustering scenarios?
A. The options for shared storage in virtual machines (VMs) has increased with each version of Hyper-V. With Windows Server 2012 R2 Hyper-V, there are now three options, each with its own benefits:
- iSCSI - This is the original option, completely separate from Hyper-V. It leverages the TCP/IP network connection of the VM and the guest OS's iSCSI initiator. Using iSCSI removes any functionality requirements for Hyper-V and only requires iSCSI support in the guest OS but requires iSCSI support in the storage subsystem.
- Virtual Fibre Channel - Introduced in Windows Server 2012 Hyper-V, this offers the ability to create virtual SANs on the Hyper-V host. It leverages the NPIV feature of host bus adaptors (HBAs) and connects to them using virtual HBAs for VMs, which allows VMs to be directly connected to LUNs on a SAN via Fibre Channel. The virtual Fibre Channel adapter has its own unique World Wide Port Name (WWPN) which can then be zoned to the storage. This means VMs can be given access to LUNs, and the Hyper-V host itself doesn't actually have access.
- Shared VHDX - Introduced in Windows Server 2012 R2 Hyper-V, Shared VHDX allows a virtual hard disk (VHDX) file to be connected to multiple VMS, provided the VHDX is stored on a CSV volume or on a scale-out file server. This option is unique in that the shared storage is provided without exposing the underlying storage fabric to the VM, making it a great solution for host scenarios.
- SMB 3 - Another option might be to use SMB 3, which is now supported for certain enterprise applications such as SQL Server (and Hyper-V itself, to store VMs).
In general, try to leverage Shared VHDX first, as this simplifies management and avoids exposing the storage fabric to the VM directly. If this isn't an option, then the choice of virtual fibre channel or iSCSI will depend on the connectivity technology available in the environment.