iSCSI connection issues with Hyper-V Server

If you have a Hyper-V Cluster connected through iSCSI to a storage solution and sometimes you get errors that your CSV volumes went offline. In some cases, the Windows Failover Cluster is able to recover and bring online automatically and your virtual machines will not stop. In other situation if your CSV volume is not been recovery you will have to bring online the volume and then start all the virtual machine manually.

If you see the following sequence of events on the event viewer or in the Failover Cluster Manager events:

Error – iScsiPrt 20

None Connection to the target was lost. The initiator will attempt to retry the connection.

This mean that the connection to the target was lost. The initiator will attempt to retry the connection

This event is logged when the initiator loses connection to the target when the connection was in iSCSI Full Feature Phase. This event typically happens when there are network problems, network cable is removed, network switch is shutdown, or target resets the connection. In all cases initiator will attempt to re-establish the TCP connection.

Error – iScsiPrt 7

None The initiator could not send an iSCSI PDU. Error status is given in the dump data.

This mean that the initiator could not send an iSCSI PDU. Error status is given in the dump data.

This event is logged when the initiator could not send an iSCSI PDU to the target.

Information – iScsiPrt 34

None A connection to the target was lost, but Initiator successfully reconnected to the target. Dump data contains the target name.

This mean that the iSCSI connectivity was restored

How to solve it

The way that I found that solve this events stopping appearing at the event viewer and off course solving the iSCSI issues within my Hyper-V Cluster were:

1. Install following KBs

2. Configuring Network Prioritization

It is possible to customize NP if the cluster does not automatically assign networks to use the traffic pattern that you want, which will change the ranked order, and hence the function.  For example, you may want Cluster Network 3 to be used for “Live Migration Traffic” as it is the fastest, so you would change its Metric to a value between 1000 and 1100, such as 1050, so that it is ranked second on the list.  Once Cluster Network 3 has the second-lowest metric it will be used for Live Migration Traffic.

To change the value of a network metric, run:
$n = Get-ClusterNetwork “Cluster Network 3”
$n.Metric = 1050

This will change the metric of Cluster Network 3 to 1050.

Now you get the following output from running
Get-ClusterNetwork | ft Name, Metric, AutoMetric

Name                       Metric     AutoMetric
—-                       ——     ———-
Cluster Network 1          1000       True
Cluster Network 3          1050       False
Cluster Network 2          1100       True
Cluster Network 4          10000      True
Cluster Network 5          10100      True

You may have noticed that is a property associated with each network called AutoMetric.  This indicates whether the Metric was set using the default values (True) or if it had been later adjusted by an admin (False).  This gives insight into whether NP has been configured on the cluster.  Using this flag, it is actually possible to change the value of a network back to its original and automatically assigned value, by running the cmdlet:
$n = Get-ClusterNetwork “Cluster Network 3”
$n.AutoMetric = $true

3. Disabled the TRIM Feature

The following command needs to be executed to Turn off Windows TRIM feature

fsutil behavior set disabledeletenotify 1

4. Disabled ODX

To disable ODX on the Hyper-V Server, just follow this steps:

1. Open a Windows PowerShell session as an administrator.

2. Check whether ODX is currently enabled (it is by default) by verifying that the FilterSupportedFeaturesMode value in the registry equals 0. To do so, type the following command:

Get-ItemProperty hklm:systemcurrentcontrolsetcontrolfilesystem -Name “FilterSupportedFeaturesMode”

3. Disable ODX support. To do so, type the following command:

Set-ItemProperty hklm:systemcurrentcontrolsetcontrolfilesystem -Name “FilterSupportedFeaturesMode” -Value 1

Marcos Nogueira

With more than 18 years experience in Datacenter Architectures, Marcos Nogueira is currently working as a Principal Cloud Solution Architect. He is an expert in Private and Hybrid Cloud, with a focus on Microsoft Azure, Virtualization and System Center. He has worked in several industries, including Aerospace, Transportation, Energy, Manufacturing, Financial Services, Government, Health Care, Telecoms, IT Services, and Gas & Oil in different countries and continents. Marcos was a Canadian MVP in System Center Cloud & Datacenter Managenment and he has +14 years as Microsoft Certified, with more than 100+ certifications (MCT, MCSE, and MCITP, among others). Marcos is also certified in VMware, CompTIA and ITIL v3. He assisted Microsoft in the development of workshops and special events on Private & Hybrid Cloud, Azure, System Center, Windows Server, Hyper-V and as a speaker at several Microsoft TechEd/Ignite and communities events around the world.

Leave a Reply

Your email address will not be published. Required fields are marked *