VMware’s Recommendations for VMFS Alignment performance study article suggests that it is not necessary to align the boot disk in a virtual machine and that it is only recommended for data disks in a virutal machine.
While a data disk in a virtual machine is likely to generate the largest amount of disk I/O in a virtual machine, properly aligning the virtual guest OS boot disk partition will also help to improve performance of your virtual machine.
Creating a properly aligned data file system partition in a virtual machine
The most straighforward and easiest way to align a disk in a virtual machine is when creating a new data file system partition. Information on how to do this is outlined in the VMware article referenced above.
Creating a properly aligned NTFS OS boot partition in a virtual machine
Creating a properly aligned OS boot partition in a virtual machine is somewhat more involved. The following steps outline how to prep a properly aligned NTFS boot partition for a virtual machine in ESX Server.
The process can be summarized as follows:
- Create a virtual machine in ESX Server
- Attach a WinPE boot disk (or ISO image) to your virtual machine (see below)
- Boot your vanilla virtual machine with the WinPE media / ISO
- Create a properly aligned NTFS partition
- Exit – save your virtual machine as a template or proceed to install the guest OS
First, you will need some form of Windows PE boot media. Refer to the following links for information on how to prepare your WinPE boot disk:
Microsoft Technet Walkthrough: Create a Bootable Windows PE RAM Disk on CD-ROM
Windows ITPro: How to create the bootable Windows Preinstallation Environment (WinPE) CD-ROM
One you have your WinPE media in-hand, attach it to the VM and boot the VM into the WinPE environment. Once in the WinPE command prompt, use the diskpart.exe utility to create a properly aligned partition for the VMs guest OS boot partition. To do this, perform the following:
diskpart
select disk 0 <-- the VM OS boot disk
create partition primary align=64
Exit diskpart by typing ‘exit’ and then shut down your virtual machine. Your VMs OS boot partition is now ready for OS installation.
When installing your Windows operating system and prompted for a location to install the OS, select and use the existing partition created above and format it using NTFS. Do NOT delete and recreate the existing partition as this will break the alignment of the partition you created above.
Once you have completed the OS setup you can use VMware tools to convert the VM to a template – this will speed up deployment of future VMs with properly aligned guest OS boot partitions.
If you create new data disks within your virtual machine, don’t forget to follow the steps outlined above to ensure optimal performance of your new VM.
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.