Quick ways to check disk alignment with ESXi and Windows VM’s

Posted on Updated on

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 the DS 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 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

esxistartingsector

 

Some note about this –

RED Box – Is the local boot disk, so its starting sector will be 64, this is okay it’s just a 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 in labeled in bytes not sectors. To find the starting sector just divide the Partition Starting Offset by the Bytes per 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.

From a Command Prompt, type in ‘msinfo32.exe’ to bring up this screen, navigate as shown below, and note your Partition Starting Offset.

windowsstartingsector

 


2 thoughts on “Quick ways to check disk alignment with ESXi and Windows VM’s

    SutoCom said:
    June 12, 2015 at 9:57 am

    Reblogged this on SutoCom Solutions.

    Like

    VM Check Alignment Tool « vmexplorer said:
    September 8, 2016 at 3:27 pm

    […] version seems to do a better job, but you don’t need any tools to check alingment just read this blog I wrote as it’s so simple to check […]

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s