Virtual Machine Disk Alignment

Some of this information is taken from the excellent work that Ricky El-Qasem ( has done.

I have gone through and tested this procedure on a few machines with good results but please note that I do not take any responsibility for any damage that occurs to a virtual machine through performing these tasks.  My advice is to always take a backup of the virtual machine before beginning any tasks like this.

Within the virtualized environment, especially when using Windows Server 2003 or Windows XP as the guest operating system, the performance of a virtual machine can be affected by how the disks are aligned.  Here is a brief explanation of what Disk Alignment means within VMware:

In a SAN environment, the smallest hardware unit used by a SAN storage array to build a LUN out of multiple physical disks is a called a chunk or a stripe. To optimize I/O, chunks are usually much larger than sectors. Thus a SCSI I/O request that intends to read a sector in reality reads one chunk.

On top of this, in a Windows environment NTFS is formatted in blocks ranging from 1MB to 8MB. The file system used by the guest operating system optimizes I/O by grouping sectors into so-called clusters (allocation units).

Figure 1 shows that an unaligned structure may cause many additional I/O operations when only one cluster is ready by the guest operating system.


The best course of action is therefore to align the NTFS volumes in line with the VMFS volumes to reduce the number of read operations required to read information.  The chunks used within VMware are 64K chunks.  Windows 2008 and Windows 7 already align themselves to 64K chunks but Windows Server 2003 and Windows XP align themselves usually to around 32K chunks and therefore the following technique can be used to align these operating systems to 64K chunks instead.

As an example, before writing this document, I performed a test with a Windows Server 2003 server which was not aligned to 64K chunks.  The test involved powering up the virtual machine from being powered off and timing it to the point the ‘CTRL+ALT+DEL’ screen appeared.  The virtual machine was then cloned, the modifications to the server were performed and then the test was repeated again.  The result was as follows:

Server A                    –           Boot Time Before:         58.27 seconds

Server A                    –           Boot Time After:            35.34 seconds

As you can see there was a saving of approximately 23 seconds just during the boot process and therefore I’m sure that you can imagine the performance improvement that could be seen in normal operation.

Please note that this method may not work correctly on some machines and therefore a full backup should be performed on the virtual machine before attempting to perform this work.

Please note that you will need to download the gparted iso to perform this work, this is available from the following location:



Stage 1 – Reboot Virtual Machine into gparted iso.

The first stage of the alignment method is to power down the virtual machine.  You should then connect up the gparted-live-0.9.0-7.iso which you should have downloaded previously.  You should then power up the virtual machine again.

Select the GParted Live (Default Settings) option.

Keep the selected option ‘Don’t touch keymap’ and click OK.

Type in ‘02’ to select ‘British English’ and then press enter.

Next type in ‘0’ and then press Enter.

Gparted will now finish loading up.

Stage 2 – Checking the current alignment of the disks

In the GParted program, right mouse click on the disk and then click information:

As you can see from this screen, the first sector is not a multiple of 64.  This one is 63 and therefore it is not aligned.  Change the disk at the top of the program and perform the same task again.

Stage 3 – Align Disks

Select the first disk and highlight the partition by clicking on it.

Click the ‘Resize/Move’ button.

You can now see the amount of space that is assigned to the disk.  To align the disk correctly, the ‘Free space preceding’ should be set to ‘8’ Mib.

Click the ‘Resize/Move’ button once the figures have been inserted.

Repeat the process for the additional disks that are unaligned.

Please note that the tasks will not be performed until you click the ‘Apply’ button. 

The resizing and moving operations may take some time to complete, depending on the amount of data on the disk.

Stage 4 – Check the alignment of the disks

Once the operations have been completed but before rebooting the server, check the alignment of the disks following the method in Stage 2.

The first sector should now read a value that can be divided by 64 and produce a whole number.  If it does not, then the operation has not been performed correctly.

Stage 5 – Confirm the operation of the server

The final stage is now to shut down the server, unmount the gparted iso file and then power up the virtual machine from its own disks.

Confirm that the virtual machine boots correctly and that the applications function as expected.  You should notice that the boot time of the server is reduced.

About the Author


I have been in IT for the past 15 years and using virtualisation technologies for around the past 8 years. I started, as quite a lot of people do, working with PCs after playing with such iconic systems like the ZX81, ZX Spectrum and then progressing through 386s, 486s, Pentiums etc. After being headhunted at sixth form to work for a small company based around Hertfordshire, UK. I began working with small businesses and gaining a lot of hardware experience. Three years later, after helping to increase the size of the business, I needed to gain exposure to a larger environment to progress my own career. I joined a large manufacturing company around Electronic Test and Measurement which progressed my skills onto more PC work, hardware work and then onto Server Operating Systems. I progressed again onto a consultancy company based in Reading, UK. Initially working as an engineer performing hardware / software installations for larger companies contracted out to the consultancy company, I moved up into a Consultant position continuing my travel across the UK assisting and providing solutions to companies. I finally moved on again to my current position, working back in Hertfordshire, UK. Again working for a large manufacturing company, this time with over 50,000 users worldwide. I am responsible for the datacenter hardware, the storage environment, the vmware environment and also implementing their new Citrix XenApp farm. My days are busy but also productive, its a friendly environment and in my four years of being with the company, I have seen many changes in technology and infrastructure in use within the company. About the site I started this site as I had been thinking of having more of a presence on the web for a while. On a daily basis, I perform tasks and use tools that others may not use or may not think to do and therefore I thought that I would share some of these experiences and tips with others to help with their day to day work. Currently, my main focus of work is around VMware and Veeam Backup & Replication but hopefully as my tasks progress, I’ll be able to share useful bits of information about other areas of IT as well.

Leave a Reply

Your email address will not be published. Required fields are marked *