The disk management services could not complete the operation


I recently moved to the UK and left most of my “tools” at home that I have gathered over the years.

As happens more often than not, I needed a tool and I didn’t have it on me.  I wanted to build a Server 2003 template VM but before installing the OS I wanted align the system partition so that the offset was at 64 and not the default 63 that Server 2003 uses (Server 2008 now uses an offset of 1024 by default on any disk larger than 4Gb). You should read this if you don’t know setting the partition alignment is so important. The white paper is written for ESX 3 but it still relevant.

To make a long story short I downloaded all the components and created my BartPE ISO. Now I have done this in the past and it worked great but this time I ran into several issues including diskpart not starting with “The disk management services could not complete the operation” and “DiskPart encountered an error starting the COM services”.

After several failed attempts I had a brain wave! I already have a Windows 2008 VM up and running so why not use it to do the alignment? Setting alignment on non-system disks is easy on 2003 as you can just use the diskpart command “Create Partition Primary Align=X” before you have any data on the drive. Server 2008 makes it even easier by setting an alignment of 1024 by default when configuring new partitions.

To enable me to set the alignment using the 2008 server I did the following –

  1. 1.       Removed the 2003 VM from inventory (but left the vmdk on the storage)
  2. 2.       Edited the properties of the 2008 server and added the 2003 server vmdk as an additional drive.
  3. 3.       Fired up disk manager and let Windows 2008 discover and format the drive with a single partition
  4. 4.       Removed the disk by editing the properties of the 2008 VM (shut it down first)
  5. 5.       Navigated to the VMX (and vmdk) of the template and registered it with vCenter again.
  6. 6.       Mounted the 2003 R2 ISO and started the install
  7. 7.       When I got to the point where setup asks to format the drive I told it not to format the drive
  8. 8.       Finished the installation
  9. 9.       Once the VM was up and running I confirmed the alignment and sure enough it was the default 1024 that Server 2008 uses.

I will create my BartPE ISO again when I get time but for now I know it works and that every 2003 VM that gets deployed from the template will be aligned and thus perform better and stress the SAN less.

  1. #1 by Ben Karciauskas on January 26, 2010 - 5:05 pm

    I didn’t know it at the time but Microsoft now recommend setting all of there OS’s to a 1024k alignment nit just 2008. See here for details

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: