7.6.4. Aligning Partitions for Windows Virtual Machines

To align a disk for a Windows virtual machine, you need a working Windows virtual machine. Once you have it at hand, you can use the diskpart or diskpar utility (depending on your operating system) to align the disk:

  1. Create a new disk for the virtual machine. On this disk, you will create aligned partitions. Then you will connect the disk to a new virtual machine and install your Windows guest OS on this disk.
  2. Open the command-line prompt, and run the diskpart or diskpar utility.
  3. Select the disk you want to align.
  4. Create the primary partition on the disk, and align it.
  5. Exit the diskpart or diskpar utility, and close the command-line prompt.

The following example demonstrates how to use the diskpart utility to align disk 1 by setting the offset of 64 for it:

images/usingdiskpart.png

Once you align the virtual disk, disconnect it from the virtual machine. When creating a new virtual machine, choose this disk for use with this virtual machine.