VMware Solutions Discussions

W2003 server VM partition alignment on ESXi

doug_dockter
6,022 Views

What is the best way to align the partitions of a W2003 server VM running on ESXi?  I've read elsewhere that you cannot use mbralign as it requires the service console.

1 ACCEPTED SOLUTION

timparkinson
6,022 Views


That complicates things somewhat.

There is a second way, and one which I've had to use with VMs with dynamic disks.

Create a new disk on the VM of the same size as the one you need to align. In the VM run diskpart and:

rescan

list disk

select disk X

create partition primary align=32

(where X is the new disk number)

Boot with a Boot CD such as BartsPE, or shut the machine down, detach the disks and attach as secondary disks to another VM. Run:

xcopy d:*.* e😕 /S /V /C /H /R /K /O /X /Y

(with the appropriate drive letters where I have d: and e:). That will copy all the data to the new aligned drive. Drop the original drive from the VM (leaving it on disk just in case), restart the VM and when Windows asks for a reboot, let it.

This info from http://communities.vmware.com/thread/147888?start=15&tstart=900

View solution in original post

8 REPLIES 8

jthaloor
6,022 Views

I have seen customers use GPARTED with live CD to fix this. http://gparted.sourceforge.net/.

timparkinson
6,022 Views

If your datastore is NFS (or you can migrate to NFS), you could run mbralign from a linux machine (physical or virtual).

doug_dockter
6,022 Views

I've been reading alot about the advantages of using NFS for the datastore.  Unfortunately I don't have an NFS license for my iSCSI filer.

timparkinson
6,023 Views


That complicates things somewhat.

There is a second way, and one which I've had to use with VMs with dynamic disks.

Create a new disk on the VM of the same size as the one you need to align. In the VM run diskpart and:

rescan

list disk

select disk X

create partition primary align=32

(where X is the new disk number)

Boot with a Boot CD such as BartsPE, or shut the machine down, detach the disks and attach as secondary disks to another VM. Run:

xcopy d:*.* e😕 /S /V /C /H /R /K /O /X /Y

(with the appropriate drive letters where I have d: and e:). That will copy all the data to the new aligned drive. Drop the original drive from the VM (leaving it on disk just in case), restart the VM and when Windows asks for a reboot, let it.

This info from http://communities.vmware.com/thread/147888?start=15&tstart=900

doug_dockter
6,022 Views

I think this sounds like a plan.  Thanks.

ogra
6,022 Views

Hi All,

I think the question is already answered.

Though wanted to throw my 2 Cents out here 🙂

First thing first, for NFS there is no Alignment required.Thats the advantage of NFS. File system is with storage.

However, in iSCSI FC ( typically SAN) mbralign, mbrscan are the tools which help you to align VM's partitioned provisioned. To be more specific .vmdks.

Hope that helps !

Cheers !!!

timparkinson
6,022 Views

Are you sure this is the case. I understand that there is no need for VMFS partition alignment on NFS (that you would normally get by setting the partition type to VMware when using LUNs), however the guest partitions are still going to be offset within the VMDK, and not aligned with netapp block boundaries, thereby still causing partial writes whether on NFS or VMFS. Unless I am completely reading the situation incorrectly.

spence
6,022 Views

I'm not certain where everyone is getting their information regarding NFS, but it is wrong.  Windows 2003 does not use a partition offset that is aligned with the NetApp 4k WAFL block boundaries.  You still MUST align your Windows 2003 and older VMs.  Please read http://www.netapp.com/us/library/technical-reports/tr-3747.html.  Now since you are using ESXi it complicates things, since as you noted, mbralign requires the use of a service console.  There are some tricks with the use of NFS datastore,s by that you can have a Linux host that also mounts the NFS export and you run mbralign there or you can stand up a ESX host for the duration of your alignment.

Public