ESXi/ESX hosts with visibility to RDM LUNs being used by MSCS nodes with RDMs may take a long time to start/reboot or during LUN rescan
Lets see how to set for specific hosts and to all hosts in a cluster.
To see ScsiCanonicalName of a Specific Virtual Machine –
(Get-VM VMNAME | Get-HardDisk -DiskType RawPhysical).ScsiCanonicalName
To See current status of “IsPerenniallyReserved” for a Specific Host –
$myesxcli = get-esxcli -VMHost 10.10.10.10
$myesxcli.storage.core.device.list("naa.6000044444523030303836").IsPerenniallyReserved
To Set this for a Specific Host –
$myesxcli = get-esxcli -VMHost 10.10.10.10
$myesxcli.storage.core.device.setconfig($false, "naa.600009444423252523030303836", $true)
To Apply on a Cluster –
Enter VMNAME
Enter CLUSTERNAME
First – Remove Line 10 to See Current Status of all hosts in the Cluster – $myesxcli.storage.core.device.setconfig($false, “$device”, $true)
If you are ok .Then insert line 10 and run the script
$devices = (Get-VM VMNAME | Get-HardDisk -DiskType RawPhysical).ScsiCanonicalName $Cluster = Get-Cluster CLUSTERNAME $vmhosts = $Cluster | Get-VMHost Foreach ($Vmhost in $Vmhosts) { $myesxcli = get-esxcli -VMHost $Vmhost.Name Foreach ($device in $devices) { $myesxcli.storage.core.device.setconfig($false, "$device", $true) $Device $ReservedStatus = $myesxcli.storage.core.device.list("$device").IsPerenniallyReserved $ReservedStatus } }
Great work, simple and usefull