Error: The requested resource is in use when bringing shared VMDK online in WSFC using Failover Cluster Manager - VMware vSphere
search cancel

Error: The requested resource is in use when bringing shared VMDK online in WSFC using Failover Cluster Manager - VMware vSphere

book

Article ID: 402005

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:

  • Attempts to bring the newly shared vmdk on windows fail over cluster service online inside the guest using Failover Cluster Manager fails with the error: "The requested resource is in use."
  • After migrating virtual machines with existing shared VMDKs hosted on Microsoft Windows Cluster Service (MSCS) from one ESXi host to another, the shared disk became inaccessible from within the guest OS.
  • Prior to vMotion, the disks were functioning normally. However, post-migration, the guest operating system was unable to detect the shared disks.
  • When the virtual machine was moved to a different host, the disk accessibility was restored.

Environment

  • VMware vSphere ESXi 8.x
  • VMware vSphere ESXi 9.x

Cause

  • The issue is caused by a SCSI-3 Persistent Reservation (PR) key slot limit in VMFS for Clustered VMDKs. Each host path to the backing LUN registers a PR key for the shared VMDK device. The total number of supported PR keys per device is limited to 160. When the LUN is mapped across multiple hosts with multiple paths per host, the total registered PR keys exceed 160. During the bring online attempt, if the initiating host's PR key falls outside the top 160 key slots returned by the storage target, VMFS treats the reservation state as Lost, causing the disk online task to fail inside the Guest OS.

  • Login into the affected host via SSH and run the below mentioned command to understand the number of  Persistent Reservation keys are present on the target device:

    vmkfstools -L readkeys /vmfs/devices/disks/naa.############################ |wc -l
    190

  • The The /var/run/log/vmkernel.log file confirms that the target reported more keys than the allocated slots:

    YYYY-MM-DDTHH:MM:SS.sssZ In(182) vmkernel: cpu2:2114958)FSS: 157: Reservation state of ##-##-## moved from Register In Progress to Reservation In Progress
    YYYY-MM-DDTHH:MM:SS.sssZ In(182) vmkernel: cpu106:2098312)ScsiDevice: 10754: Set resv flag for device:naa.############################
    YYYY-MM-DDTHH:MM:SS.sssZ In(182) vmkernel: cpu2:2114958)VSCSI: 10646: Registered SCSI-3 Persistent Reservation key (type WEAR) for datastore ########-########-####-############
    YYYY-MM-DDTHH:MM:SS.sssZ In(182) vmkernel: cpu2:2114958)FSS: 157: Reservation state of ##-##-## moved from Reservation In Progress to Reserved
    YYYY-MM-DDTHH:MM:SS.sssZ In(182) vmkernel: cpu106:2098312)VSCSI: 2742: handle ################(GID:8207)(vscsi1:1):HB state change: HB_Loss -> HB_Ok
    YYYY-MM-DDTHH:MM:SS.sssZ In(182) vmkernel: cpu52:2098839)NMP: nmpCheckForMatchingKey:1863: Target reported more keys (0xbc) than allocated slots: key ###############
    YYYY-MM-DDTHH:MM:SS.sssZ In(182) vmkernel: cpu52:2098839)ScsiDevice: 10672: VMFS notified as a result of WEAR reservation removal for device:naa.############################. Reason: "Device Probe".

Resolution

Broadcom Engineering is aware of the current limitation regarding the number of Persistent Reservation (PR) keys supported per device and is actively working to increase this limit in future releases.

Workaround:

  • Un-present the LUN from few hosts which do not require access to bring the total path count below the 160 limit.

    Or

  • Reduce the number of paths per LUN to bring the total presented paths across all hosts below the 160 limit.