YYYY-MM-DDTHH:MM:SS.mmmZ info vpxd[12340] [Originator@6876 sub=Default opID=<<opid>>] [VpxLRO] -- ERROR task-20303 -- storageSystem-30 -- vim.host.StorageSystem.detachScsiLun: vim.fault.ResourceInUse:
--> Result:
--> (vim.fault.ResourceInUse) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = <unset>,
--> type = "Can't Detach RDM LUN",
--> name = "<<vml_id>>"
--> msg = "Received SOAP response fault from [<SSL(), /vpxa>]: detachScsiLun
--> Received SOAP response fault from [ /sdk>]: detachScsiLun
--> The resource '<<vml_id>>' is in use."
--> }
--> Args:
-->
--> Arg lunUuid:
--> "<<vml_id>>"
YYYY-MM-DDTHH:MM:SS.mmmZ info hostd[2102689] [Originator@6876 sub=Vimsvc.TaskManager opID=<<opid>> user=<<user_name>>] Task Completed : haTask-ha-host-vim.host.StorageSystem.detachScsiLun-86249828 Status error
YYYY-MM-DDTHH:MM:SS.mmmZ info hostd[2102689] [Originator@6876 sub=Solo.Vmomi opID=<<opid>> user=<<user_name>>] Throw vim.fault.ResourceInUse
YYYY-MM-DDTHH:MM:SS.mmmZ info hostd[2102689] [Originator@6876 sub=Solo.Vmomi opID=<<opid>> user=<<user_name>>] Result:
--> (vim.fault.ResourceInUse) {
--> type = "Can't Detach RDM LUN",
--> name = "<<vml_id>>",
--> msg = "",
--> }
VMware vSphere ESXi
VMware vSphere vCenter server
Some Virtual machine(s) still attaches the device (LUN) as a RDM device and when detaching the LUN, hostd (RDMManager) checks it is registered(VM attaches the device) or not and throws an error if it is registered in some VM(s).
PS> Get-VM | Get-HardDisk -Disktype "RawPhysical","RawVirtual" | Where-Object {$_.DeviceName -eq "vml.<<vml_id>>"} | Format-Table -Property Parent,DeviceName,Name -Autosize
Parent DeviceName Name
------ ---------- ----
<<VM_Name>> vml.<<vml_id>> Hard disk 3