kenhutchinson
Enthusiast
Enthusiast

Windows XP - Aligning the disks for VDI

Jump to solution

Hi,

Has anyone managed to actually successfully complete this procedure following the VMware guide at http://www.vmware.com/pdf/esx3_partition_align.pdf?

My experience is the following:

  • If you create a new vdisk from a Windows XP VM and follow the guide using diskpart.exe, the version included with Windows XP does not support the align=64 argument i.e. create partition primary align=64.  You also cannot copy a later version onto XP as you will get the incompatible version message.

  • Creating a new vdisk from a Windows 7 VM and using dispart.exe included with Windows 7 does appear to work.  The disk is initiated as MBR and diskpart creates a partition aligned at 64. The next steps are to format the disk with 32k allocation units which also works.  I then create my new Windows XP VM, attach this new vdisk as my system disk and begin to build Windows using the LSI logic controller and driver attached.  All appears to work, Windows installs on the hard disk but after the first reboot I get "Disk read error".  I have proved this is something to do with what Win7 did to the partition as if I reformat the partition during setup, it works.  Also if I create a std vdisk from Win7 with none of the alignment stuff and attach that to my new WinXP VM, it also works.

  • Finally using the old tool diskpar.exe also seems to align the disk but the Windows XP CD can't actually view the disk from setup.

So having tried all these various options, I've still not been able to align my Windows XP system partition before installing Windows.

Anybody got any idea what I'm doing wrong?

Ta!

0 Kudos
1 Solution

Accepted Solutions
vmroyale
Immortal
Immortal

Hello.

I guess this is why the "Recommendations for Aligning VMFS Partitions" document also states "Note: Aligning the boot disk in the virtual machine is neither recommended nor required. Align only the data disks in the virtual machine." Smiley Wink

It is a bit of a pain.  With that being said, in the past I have used the procedure detailed at http://blog.core-it.com.au/?p=281 with success.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com

View solution in original post

0 Kudos
12 Replies
vmroyale
Immortal
Immortal

Hello.

I guess this is why the "Recommendations for Aligning VMFS Partitions" document also states "Note: Aligning the boot disk in the virtual machine is neither recommended nor required. Align only the data disks in the virtual machine." Smiley Wink

It is a bit of a pain.  With that being said, in the past I have used the procedure detailed at http://blog.core-it.com.au/?p=281 with success.

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com

View solution in original post

0 Kudos
mittim12
Immortal
Immortal

I also aligned my XP template with gpartered.   It took me a couple of tries to get it but it is doable.    You may also want to check out something like http://www.quest.com/voptimizer-pro/.  

0 Kudos
kenhutchinson
Enthusiast
Enthusiast

Thanks for the info.  I will give the link you sent a bash.  It looks pretty good.

Although VMware specify in the link I posted that aligning disks is not recommended on system partitions, that doc is pretty old and there are countless other refs out there that talk about disk alignment on a Windows XP system partition.  The deep dive white paper springs to mind.

Some consistancy from VMware would be good though.  Should we be aligning the VDI Windows XP Golden Master system partition or not?

Will let you know how I get on...

thanks

0 Kudos
vmroyale
Immortal
Immortal

My understanding was that aligning the system partitions isn't worth the effort involved.  This logic is more based off of server installs where there really shouldn't be much going on on the system disk.  With desktops that can be a bit different as it is difficult to keep some things off of the system volume.  Bottom line is that it certainly can't hurt anything to align the system volume.

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
mittim12
Immortal
Immortal

I've always heard that it's a good thing to do for VDI desktops.  I have never done any comparison test but figured its certainly not going to hurt.   On the server side I have not ever felt the need to go back and align my old 2003 C:\ drives.

0 Kudos
kenhutchinson
Enthusiast
Enthusiast

So using GParted worked although I noticed that this procedure skips one step which is formatting the disk and specifying an allocation unit size of 32K.

So I then decided to check whether the procedure I used in step 1 using a Windows 7 VM was in fact correct but the problem was with the 32K formatting afterward as per the VMware doc.  Turns out this is the problem.  Windows XP cannot boot from a partition that is formatted with 32K allocation units or clusters.  Best just leave it as default which I think is 4KB for disks over 2GB.  Anything else and you're errmm cluster f**ked Smiley Happy

cheers for the help

0 Kudos
tacticsbaby
Expert
Expert

I know I am late the the party on this one but I have used Windows 2003 server to allign my Windows XP VMs. In order to do this I first create an empty custom XP VM with an LSI SCSI controller. Then I shut the VM down and connect its' virtual disk to a windows 2003 or 2008 server. Then I run the diskpart utility that is in those OSs. Windows XP diskpart does not cut it. From here use the instructions you already have and you will be able to allign the disk. When you are finish make sure to disconnect the VMDK from the Windows 2003 VM or you will not be able to start it. Hope this helps.

0 Kudos
kenhutchinson
Enthusiast
Enthusiast

@tacticsbaby:  Did you also format your partition with 32K allocation units from Windows 2003?  My guess is you didn't.  My procedure was exactly the same as yours but using a Windows 7 guest instead.  Formatting the disk after aligning the partition does not work if you use 32k allocation units though.

0 Kudos
tacticsbaby
Expert
Expert

I used 64k units.

0 Kudos
tacticsbaby
Expert
Expert

I used 64k units with Windows 2003 server. I have not tried windows 7 or 2008 to align an XP disk.

0 Kudos
tacticsbaby
Expert
Expert

Not sure what you did, but I have just completed a new installation of Windows XP SP3 on a vmdk that is aligned to 64k and formatted in 32k units. I did the disk prep on a windows 2003 server and I am now installing the OS. Aside from using Win 7 to do the alignment, has this ever worked for you?

0 Kudos
tacticsbaby
Expert
Expert

The first line in the document you linked says that the doc is obsolete. For more info on optimizing XP check out: http://www.ituda.com/Docs/VMware/Best_Practices_For_Creating_VMware_View_Golden_Master_Images.pdf

0 Kudos