Hi Team,
ESXi host reboot taking a very long time and stuck with vmw_vaaip_hds (around 30 to 40 minutes) may be due to the host attached with multiple RDMs.
Please help to suggest if we have any remediation/workaround to fix the issue without any impact.
Searched and found below the blog but few of them highlighted as the potential impact to the virtual machines in migration if we set it to perennial reserved.
https://vcloudvision.com/2019/07/26/slow-boot-times-esxi-with-p-vrdms-easy-fix/
Do we have an option to run powercli command to set perennially reserved to all the attached RDMs for one single ESXi host instead of cluster.
Thank you
Regards
Narayanan.
You could do something like this
$esx = Get-VMHost -Name $esxName
$vms = Get-VM -Location $esx
$rdms = $vms | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select -Unique ScsiCanonicalName
$esxcli = Get-EsxCli -VMHost $esx -V2
foreach($rdm in $rdms){
$naaid = $rdm.ScsiCanonicalName
$esxcli.storage.core.device.setconfig(@{device=$naaid;perenniallyreserved=$true})
}
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi,
Please check this KB, you can find the powercli commands to modify the settings at individual host level.
Regards,
Suresh
thanks for the reply suresh.
Even i also came across this KB article also but I am looking for a script to set perennially-reserved=true for all the RDM LUNs (almost 200 RDMs) attached to the host instead of going one by one.
Thank you
Regards
Narayanan.
That might be possible with PowerCLI, I can move this thread to that area if you wish?
Thanks Scott. Please do the needful
Regards
Narayanan.
Moderator: Thread moved to the PowerCLI area, user looking for a script to update close to 200 RDMs.
You could do something like this
$esx = Get-VMHost -Name $esxName
$vms = Get-VM -Location $esx
$rdms = $vms | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select -Unique ScsiCanonicalName
$esxcli = Get-EsxCli -VMHost $esx -V2
foreach($rdm in $rdms){
$naaid = $rdm.ScsiCanonicalName
$esxcli.storage.core.device.setconfig(@{device=$naaid;perenniallyreserved=$true})
}
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks LuCD for the reply.
I understand the script will check for the current VMs running on the host and exclude the RDM LUNs which attached to it. Please correct me if I am wrong.
Actually, the host is part of a cluster and the VMs (attached with RDMs) will get migrated by DRS to other hosts and the VMs will not remains the same.
Before implementing the script on the cluster level for all the ESXi hosts, need to test the script on a single host to set all the RDMs to perennially reserved (NOT VMFS datastores) and check if it resolves the delay during the reboot.
Kindly help to suggest your comments if this possible or can we try to give all RDMs in the cluster as input in a file to the script to set perennially reserved for the host.
Thank you
Regards
Narayanan.
To do this on all ESXi nodes in a cluster and for all LUNs used as RDM, you could do
Get-Cluster -Name $clusterName -PipelineVariable cluster |
Get-VM |
Get-HardDisk -DiskType "RawPhysical", "RawVirtual" -PipelineVariable rdm |
ForEach-Object -Process {
Get-VMHost -Location $cluster -PipelineVariable esx |
ForEach-Object -Process {
$esxcli = Get-EsxCli -VMHost $esx -V2
$naaid = $rdm.ScsiCanonicalName
$esxcli.storage.core.device.setconfig.Invoke(@{device = $naaid; perenniallyreserved = $true })
}
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
The cluster is consists of RDMs and VMFS datastores and the script needs to exclude the datastore LUNs from setting perennially reserved.
Can we able add to get the RDM LUN details from an input file (txt or spreadsheet) and set that LUNs only perennially reserved with Log output (Ex - Setting Perennially Reserved Flag for RDM with naa ID or Already reserved or Skipping as this LUN is used for VMFS datastore).
thank you
Regards
Narayanan.
The script only handles the RDMs.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ok LuCD. Let me test and get back to you soon. Thanks for the update.
Regards
Narayanan.
Thank you for reading my blogpost! This script is easily adjustable so that you can use it on a single host instead of the cluster. And like others have said, it will only edit RDM's, no VMFS datastores.
It seems you have figured it out, but if you still need assistance to adjust the script just let me know!
Thanks LuCD for the script. Really your support appreciated.
It Works and has one small error due to additional parentheses { at the end of the script.
regards
Narayanan
Hi there,
IHAC who has added a new ESXi host to the cluster, without any VM's running on the host. They would like to set RDMs to perennially reserved on that specific host. Please correct me if the below script would work in case Get-VM details are not called in the below script.
$esx = Get-VMHost -Name $esxName
$rdms = $esx | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select -Unique ScsiCanonicalName
$esxcli = Get-EsxCli -VMHost $esx -V2
foreach($rdm in $rdms){
$naaid = $rdm.ScsiCanonicalName
$esxcli.storage.core.device.setconfig(@{device=$naaid;perenniallyreserved=$true})
}
}
That looks to be ok and should work.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference