There are two simple checks a virtual infrastructure (VI) admin should be doing to ensure ESXi Datastores and the Windows VM’s are properly aligned. If either are misaligned then performance issues will follow. Though I’m not going to get into the whys and how’s of alignment issues I will show you how to quickly check.
1 – ESXi Datastores (DS)
By default if the VI admin formats a target datastore with vCenter Server or directly connected to a host via the VI Client the starting sector will be 2048. A starting sector of 2048 will satisfy nearly all of the storage vendors out there, however a 2048 starting sector should be validated with your storage vendor.
If the VI Admin chose to format the DS via a script then they should choose a starting sector of 2048 or what the storage vendor recommends
Example — partedUtil setptbl \$disk gpt “1 2048…..” More info here on partedUtil
Here is a simple command to check your “Start Sector”. SSH or Direct console into a host that has DSs you want to check and run this command.
~ # esxcli storage core device partition list
Some note about this –
RED Box – Is the local boot disk, so its starting sector will be 64, this is not an issue as this is the ESXi Boot disk
Yellow, Green, and Blue – Are all VSAN Disks and all have a starting sector of 2048 << This is what I’m looking for, I want to make sure all DS disks start at 2048, if not they could experience performance issues.
2 – Windows VM Check
Windows checks are pretty easy too, the starting sector offset should be 2048. Note the screenshot below shows the Partition starting offset of 1,048,576, also note it’s labeled in bytes not sectors. To find the starting sector just divide the Partition Starting Offset by the Bytes/Sector. Simple math tells us its right — 1048576/512 = 2048 Sector. If your Partition Starting offset is anything other than 1,048,576 Bytes or 2048 Sectors then the VM is not aligned and will need adjusted.
To find your Partition Starting offset, from a Windows Command Prompt, type in ‘msinfo32.exe’, go to Components > Storage > Disks, and note your Partition Starting Offset.