PermaLink VMware disk alignment VMDK settings and align at the 64k boundary04/30/2009 03:02 PM
In this example I use Windows Server 2003 R2

Partition alignment is a known issue in physical file systems, and its remedy is well-documented. The goal of the testing reported in this paper was to validate the assumption that unaligned partitions also impose a penalty when the partition is a VMware Virtual Machine File System (VMware VMFS) partition. Also have a look at Performance Tuning Best Practices for ESX Server.

This paper lists a summary of the results of our testing, recommendations for VMware VMFS partition alignment, and the steps needed to create aligned VMware VMFS partitions.

Use the Windows Automated Installation kit (AIK) for the whole installed VM.

Looking through VMware documentation I was pleased to read, storage added through Virtual Center is automatically aligned so now I only had to worry about disk alignment for the virtual machines. Below is a step by step walk through of how to add a disk to a virtual machine and align at the 64k boundary.


The following information is from NetApp and VMware Virtual Infrastructure 3 Storage Best Practices
Virtual machines store their data on virtual disks. As with physical disks, these disks are formatted with a file system. When formatting a virtual disk, make sure that the file systems of the VMDK, the Datastore, and the storage array are in proper alignment. Misalignment of the VM’s file system can result in degraded performance. However, even if file systems are not optimally aligned, performance degradation may not be experienced or reported, based on the I/O load relative to the ability of the storage arrays to serve the I/O, as well as the overhead for being misaligned.

When aligning the partitions of virtual disks for use with NetApp FAS systems, the starting partition offset must be divisible by 4096. The recommended starting offset value for Windows 2000, 2003, & XP operating systems is 32768. Windows 2008 & Vista default at 1048576 and does not require any adjustments. To verifying this value run msinfo32, and you will typically find that the VM is running with a default starting offset value of 32256 (see Figure 5). To run msinfo32, select Start > All Programs > Accessories > System Tools > System Information.

First let us check the settings, ( for this demo we have created a 8Gb partition )

Follow these steps:
Step1. Right Click on the Virtual Machine, Edit settings and highlight Hard Disk and select Next.
Step2. Select create a new virtual disk and select next.
Step3. Select a disk size and select to store the new disk with the virtual machine or use the specify a datastore option to place the new disk on a different datastore, select Next.
Step4. Leave the default options under advanced options and select next, and Finish to complete the hardware wizard.
Step5. Navigate to the console tab for the virtual machine and from the desktop right click on My Computer and select Manage, go to Disk Management.
Step6. Right click on Disk Management and select Rescan Disks.
Step7. Now open a command prompt window and type the following commands.

Image:Badkey Corner - VMware disk alignment VMDK settings and align at the 64k boundary

Invoke msinfo32, now you can see that the default disk alignment is wrong, it is set at 32k and should be 64k.

Image:Badkey Corner - VMware disk alignment VMDK settings and align at the 64k boundary

Step7. Now open a command prompt window and type the following commands.

Invoke Diskpart
C:\>diskpart

Microsoft DiskPart version 5.2.3790.3959 Copyright (C) 1999-2001 Microsoft Corporation.

type the follow command to show disks
DISKPART> list disk

Image:Badkey Corner - VMware disk alignment VMDK settings and align at the 64k boundary

Disk ###  Status      Size     Free     Dyn  Gpt
——–  ———-  ——-  ——-  —  —
Disk 0    Online      8189 MB  8033 KB
Disk 1    Online      8189 MB  8189 MB

You can see Disk 1 is the new disk we just added. Now select Disk 1.
DISKPART> select disk 1

Disk 1 is now the selected disk.
Now we create the partition and set it to the recommended alignment offset.

DISKPART> create partition primary align=64
DiskPart succeeded in creating the specified partition.

Image:Badkey Corner - VMware disk alignment VMDK settings and align at the 64k boundary

Check with msinfo32:
Image:Badkey Corner - VMware disk alignment VMDK settings and align at the 64k boundary

Now you can right click on the new volume and format with desired file system type.

Image:Badkey Corner - VMware disk alignment VMDK settings and align at the 64k boundary

again after a reboot of the virtual machine here is the last check:

Image:Badkey Corner - VMware disk alignment VMDK settings and align at the 64k boundary


Note: Now if your using 2003 enterprise or datacener edition ive noticed a bug where you receive an error when trying to format, the only work around I could find was to assign a drive letter in disk part and then format. <strange>. DISKPART> assign letter=X. DiskPart successfully assigned the drive letter or mount point

The Badkey Team


Technorati:
StatCounter Statistics

View My Stats
Visitor Activity
Planetlotus.org
Search
Badkey Block

Alblasserdam
Albrandswaard
Alkemade
Alphen
AlphenaandenRijn
Ambacht
barendrecht
Beijerland
Bergambacht
Bernisse
Binnenmaas
Bodegraven
Boskoop
Brielle
Capelle
CapelleaandenIJssel
Capelle aan den IJssel
Cromstrijen
Delfland
Delft
Dirksland
Dordrecht
Giessendam
Giessenlanden
Goedereede
Gorinchem
Gouda
gouderak
Graafstroom
Gravenhage
Hardinxveld
Hellevoetsluis
Hendrik
Hillegom
Ido
Ijssel
Jacobswoude
Katwijk
Korendijk
Krimpen
KrimpenaandenIJssel
Krimpen aan den IJssel
Lansingerland
Leerdam
Leiden
Leiderdorp
Leidschendam
Lekkerland
Liesveld
Lisse
Maassluis
Middelharnis
Moerkapelle
Moordrecht
Nederlek
Nieuw
Nieuwerkerk
NieuwerkerkaandenIJssel
Nieuwerkerk aan den IJssel
Nieuwkoop
Noordwijk
Noordwijkerhout
Nootdorp
Oegstgeest
Oostflakkee
Ouderkerk
Papendrecht
Pijnacker
Reeuwijk
Ridderkerk
Rijn
Rijnwoude
Rijswijk
Rotterdam
Rozenburg
Schiedam
Schoonhoven
Sliedrecht
Spijkenisse
Strijen
Teylingen
Vlaardingen
Vlist
Voorburg
Voorschoten
Waddinxveen
Wassenaar
Westland
Westvoorne
Zederik
Zevenhuizen
ZH
Zoetermeer
Zoeterwoude
Zwijndrecht

Powered By ND8
nd8-block.jpg
ClustrMaps
Locations of visitors to this page
My World Travel (21%)
world66.gif
47 countries World66 Member