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:
- 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.
-
Open the command-line prompt, and run the
diskpart
ordiskpar
utility. - Select the disk you want to align.
- Create the primary partition on the disk, and align it.
-
Exit the
diskpart
ordiskpar
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:
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.