.. _Accessing iSCSI Targets from Microsoft Hyper-V: Accessing iSCSI Targets from Microsoft Hyper-V ---------------------------------------------- Before connecting an iSCSI initiator of Microsoft Hyper-V to iSCSI targets working in the ALUA mode, you need to install and configure Multipath I/O (MPIO). This feature can be used starting from Windows Server 2008 R2. To connect the initiator, for example, on Microsoft Hyper-V Server 2016, do the following: #. Run Windows PowerShell with administrator privileges and install MPIO. :: > Enable-WindowsOptionalFeature –Online –FeatureName MultiPathIO Your server will automatically reboot to finalize the installation. #. In the Windows PowerShell console, configure MPIO as follows: #. Enable support for iSCSI disks: :: > Enable-MSDSMAutomaticClaim -BusType iSCSI #. Set the failover policy to Fail Over Only. The policy uses a single active path for sending all I/O, and all other paths are standby. If the active path fails, one of the standby paths is used. When the path recovers, it becomes active again. :: > Set-MSDSMGlobalDefaultLoadBalancePolicy -Policy FOO #. Enable path verification. By default, the initiator will verify each path every 30 seconds. :: > Set-MPIOSetting -NewPathVerificationState Enabled #. Reboot the server. #. Connect your targets to the iSCSI initiator as follows: #. In the **Control Panel** > **System and Security** > **Administrative Tools** > **Services** window, make sure that **Microsoft iSCSI Initiator Service** is running and its startup type is set to **Automatic**. .. image:: /images/stor_image167_1.png :align: center :class: align-center #. Launch **iSCSI Initiator**. #. In the **iSCSI Initiator Properties** window, open the **Discovery** tab and click **Discover Portal**. .. image:: /images/stor_image167_2.png :align: center :class: align-center #. In the **Discover Target Portal** window, enter the target IP address and click **OK**. Repeat this step for each target from the target group. .. image:: /images/stor_image167_3.png :align: center :class: align-center #. On the **Targets** tab, click **Refresh** to discover the added targets. .. image:: /images/stor_image167_4.png :align: center :class: align-center #. Click **Connect** for each target to connect it to the initiator. In the **Connect To Target** window, select the **Enable multi-path** checkbox and click **OK**. .. image:: /images/stor_image167_5.png :align: center :class: align-center #. On the **Targets** tab, click **Devices..**, select the connected LUN, and click **MPIO..**. .. image:: /images/stor_image167_6.png :align: center :class: align-center #. Make sure the connected LUN has several paths. .. image:: /images/stor_image167_7.png :align: center :class: align-center You can now initialize the newly added disk for use in Microsoft Hyper-V. Do the following: #. Open **Disk Management**, right-click the added disk, and choose **Properties** from the drop-down menu. .. image:: /images/stor_image167_8.png :align: center :class: align-center #. Check the settings on the **MPIO** tab. The first connected target becomes **Active/Optimized** and the preferred path. .. image:: /images/stor_image167_9.png :align: center :class: align-center #. Partition and format the disk as usual. .. image:: /images/stor_image167_10.png :align: center :class: align-center