After around three months of installing various software that uses SQL Server 2005 on my ESX server, my SQL VM finally reached it’s disk limit. I was poking around in the command line for the actual ESX server, and found a tool called vmkfstools that could do the job for me. You can resize the disk by running the command:
vmkfstools -X <size-in-mb>M <image-file>
So for example if i wanted to resize the file server.vmdk to 60GB, I would run:
vmkfstools -X 60000M server.vmdk
That was the easy part. Now I booted into Hiren’s BootCD (you can find this on the net), and ran Acronis Boot Manager to resize my partition. You can alternatively boot into the Recovery Console for Windows 2003/XP or run the Command Line on Windows Vista/2008 and run diskpart to accomplish the same thing.
That went all well and my disks were properly resized…. or so I thought, till I was greeted with the following message on boot:

Winload.exe?! Well scared that my OS was corrupt, I booted into the Windows 2008 Server CD and ran the command prompt. dir C:\ still showed all my files there, and C:\Windows\System32\ still had winload.exe in it. Just for shits and giggles, I replaced the file with the one in X:\Windows\System32 and tried rebooting.
Still didn’t work.
I booted back into the install DVD, clicked “Repair Computer”, but this time I noticed that my disk size was 0, and it said “Unknown” next to the disk. My gears were turning, and I realized that this might mean that my MBR was corrupt. Running bcdedit.exe /v confirmed that. Instead of saying:
device partition=C:
it said
device unknown
Recalling what I did a year a so back when my MBR was corrupt, I ran the following commands:
bootrec.exe /FixMbr
bootrec.exe /FixBoot
bootrec.exe /RebuildBcd
As soon as I rebooted, my system booted up without any issues!
Hope this helps anyone else this has happened to,
Brennan
January 9th, 2009 at 9:35 am
Thanks a lot.
.
YOU saved my weekend
May 13th, 2009 at 9:48 am
Thanks for the info. This happened when I ghosted my 2008 server hard drive to a bigger drive and resized the partition at the same time. The above instructions worked well.
May 16th, 2009 at 11:12 am
thanks a lot from Germany, for rescue life!
September 7th, 2009 at 7:28 pm
Hi There,
rather than doing it from the console, is it ok to do it from the VI Client GUI interface ?