Category: ESXi

Perennial Reserved RDM’s

I got asked a couple of days about why an esxi server was taking roughly 45 mins to come back up after a reboot. Looking at the node when it eventually came back up showed that it had a number of RDM’s that were associated to virtual machines. Those virtual machines were mostly Windows RDM’s  used for MSCS. What was happening is that when esxi was booting it could see all theses luns and was trying to read the header, it was that delay in its attempts to read the header that was causing the 5 min boot time.

What was needed was to reserve those luns so that they were ignored on the boot scan. Using the powercli below we can define the target cluster, scan through the virtual machines within an identify all the raw devices and mark then as reserved.  It will then do this on each nodes in the cluster which reduced your boot time from say 45mins to a few minutes (depending on your hardware)

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$TargetCluster = "Cluster Name"

$VMhosts = Get-Cluster $TargetCluster| Get-VMHost

$RDMDisks = Get-VM -Location $TargetCluster | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select ScsiCanonicalName

foreach($VMhost in $VMhosts) {
Write-Host "Connected To Server : " $VMhost
$esxcli = Get-ESXCLI -VMHost $VMhost
foreach($RDMDisk in $RDMDisks) {
Write-Host "Setting Perennially Reserved On : " $RDMDisk
$esxcli.storage.core.device.setconfig($false, ($RDMDisk.ScsiCanonicalName), $true)
}
}

ESXi And Windows Domain Controller Time Source

Bit of an old reference for the day but one i must admit i have forgotten previously, when using a windows domain controller time source for your ESXi infrastructure you may notice that with the default settings you find that it wont synchronize.

Thankfully VMware have a workaround that requires a couple of changes on the ESXi hosts to change the NTP client settings. Instructions are even provided on how to configure you domain controllers w32time service to point to one of the many internet NTP services so you always have good/reliable time source configured.

 

For the ESXi client NTP changes heres the article reference https://kb.vmware.com/s/article/1035833