VMware Cloud Community
BriansVblog
Contributor
Contributor

Disk Alignment on Windows Guest

I have a number of existing Windows VM .vmdk's that are not correctly aligned to the underlying disk. I've tried creating a new VM, mounting the .vmdk to another VM, aligned the disk using diskpart, and then cloned the virtual hard disks using CloneZilla, but this process has failed.

Has anyone successfully aligned an existing Windows VM? How you would properly align a P2V'd VM? Thanks for your help in advance.

0 Kudos
21 Replies
habibalby
Hot Shot
Hot Shot

Yes, I have successfly aligned a Windows Server 2003 64-bit converted from P2V using VMware Converter 3.0 without any problem.

Best Regards,

Hussain Al Sayed

Best Regards, Hussain Al Sayed Consider awarding points for "correct" or "helpful".
0 Kudos
Anders_Gregerse
Hot Shot
Hot Shot

Great question - Haven't thought of it.

If you clone partition to partition, your diskalignment should be allright. Also make sure that the blocksize in the guest disk is matching the application (if performance is important.

0 Kudos
BriansVblog
Contributor
Contributor

I received a "Missing Operating System" error when doing the above process. Any ideas on how to go about aligning an existing Windows OS?

0 Kudos
dmaster
VMware Employee
VMware Employee

yes we did.. but this has to be done before you are going to use the partition.

we created and alignd our partitions with the diskpart command

CREATE PARTITION PRIMARY ALIGN=64

0 Kudos
BriansVblog
Contributor
Contributor

What process did you use to clone your source and destination virtual hard disks/partitions?

0 Kudos
RParker
Immortal
Immortal

Actually I don't think anyone has really looked at this carefully. When you convert a physical server, it's not changing the cluster size. It's only moving data and keep the parameters the same.

When you format a disk on a phsyical box, it defaults to a 4k cluster size. If your cluster size on a SAN is 32K, you would then have to go back and adjust the cluster size in the VM, since the VM would have the same cluster size as the physical box.

If you create a NEW VM, and you install Windows you don't even get an option to choose what cluster size you want.. Therein lies part of the problem. What cluster size is it? 4K, by default. So you have to create the VM, resize the cluster later, then every VM you clone from them on is alligned.

I did this, we actually saw worse performance, and finally realized after exaustive search There is no conclusive evidence that "aligning" the partition with the SAN cluster size makes any difference whatsoever, and should be done for EVERY VM.. We did our own test, and not only does making 32K cluster size (which is VM Ware recommended size by the way) a waste of space, but in our case, it make a significant different in performance (to our detriment).

Therefore in my opinion, disk alignment is not and should not be a priority.

0 Kudos
dmaster
VMware Employee
VMware Employee

We use the alignment on the following way.

We use shared storage on a Symmetrix DMX3 SAN.

With ESX 3.x when you create a new datastore of SAN storage it will automaticly align it for you.

We do not align our c-drives. We only align the extra drives such as d,e,f etc. most important reason because of the theoritical 12% performance boost. especially when you run high disk io intensive applications on it.

we align this drives by creating the windows partition with diskpart from a dos command prompt.

0 Kudos
KungFuJoe
Enthusiast
Enthusiast

Some SANs alleviate the need to manually align partitions if you use RDMs. NetApp is one. If you create a LUN and specify a filetype of NTFS (or Windows, I think) and present it to the VM as RDM, then you don't need to use diskpart to format...just do it normally.

IBM is another one.

Clariion, however, requires manual partition alignment regardless of using RDM or VMFS.

Your best bet is to refer to your storage solution's best practices guide.

0 Kudos
KungFuJoe
Enthusiast
Enthusiast

To answer the question directly, I would say, at this point, the only solution I know of is to create a new volume/partition, using the correct alignment parameters and manually copying all data over from the old (unaligned partition) to the new one. Cloning doesn't work because I believe it will reformat the destination volume anyways.

0 Kudos
KungFuJoe
Enthusiast
Enthusiast

habibalby,

How did you align the destination partition of a P2V using VM Converter?

0 Kudos
BriansVblog
Contributor
Contributor

I do not see an option to align the destination disk in VMware Converter.

0 Kudos
dmaster
VMware Employee
VMware Employee

so far i know .. that is not possible with the VMware Converter.

p.s. if you think answers from users on the forum are usefull or correct, please award them with points.

0 Kudos
conreyta
Enthusiast
Enthusiast

Yes.

Using the doc below as a starting point, and cloning in one VM (with unaligned) to another (aligned disk). This is netapp specific however. (I had said P2V but it wasn't the vmware tool)

0 Kudos
habibalby
Hot Shot
Hot Shot

Hello,

Have a look at the attached screen shot. You will be able to resize the Disk Size during the conversion.

Best Regards,

Hussain Al Sayed

Best Regards, Hussain Al Sayed Consider awarding points for "correct" or "helpful".
0 Kudos
jeremypage
Enthusiast
Enthusiast

Resizing the disk is not necessarily the same thing as aligning the partition.I'm not sure but I don't think Converter aligns the partition, since it does not know the type of storage it's going on. I know that our converted workstations where not aligned.

0 Kudos
conreyta
Enthusiast
Enthusiast

Correct. Resizing the disk is NOT the same thing as block level alignment.

0 Kudos
BriansVblog
Contributor
Contributor

I'm bringing this question back up. Has anyone successfully been able to align a P2V'd VM to the correct partition offset?

0 Kudos
RParker
Immortal
Immortal

You have to do this after the fact. If you look at the msinfo32 inside a Windows guest, and view the disks, you can see the starting offset for the partition. The starting offset should be 32768 in order to be aligned.

Your SAN provider should have a tool to help you accomplish this. Netapp does for us. That's how you align the partitions. But there is still not real proof that this is really necessary. Some people say yes, some people say no. I ran a few benchmarks myself pre and post alignment, no real change. MAYBe under extreme circumstances you might see a benefit of a few IO, MAYBE... Still as yet to be determined.

0 Kudos
jeremypage
Enthusiast
Enthusiast

It's certain that it can reduce your IO requirements. THe question is, is it worth it for the time you spend doing it.The more disk IO a server performes the more important it is to have the correct alignment.

0 Kudos