Monday, December 26, 2011

Gparted: Extend Virtual Windows Server Disk

I just setup a Windows Server 2008 machine in my lab to host Exchange 2010.  I use VirtualBox for my lab, by the way.  I had added two disks to this particular virtual machine, one for the OS and one for data.  The OS disk was only 20 GB, which ran out pretty quickly.  So I simply added yet another (much larger) virtual disk and booted using a Gparted Live CD.  Then I simply used the dd command to copy everything from the smaller disk onto the larger disk.

After the copy, the new disk showed that it had a 20 GB partition and the rest of the space on the new disk was not partitioned.  Still using Gparted, I chose to extend the partition on the disk to include the extra space.  All in all, this gave me 40 GB total.

Everything looked good, so I rebooted and was greeted with an error when trying to boot into Windows 2008.  No problem.  I booted the machine from the Windows 2008 install disc and chose the repair option.  In some other versions of Windows, choosing the repair option will cause Windows to attempt to discover and repair any errors it finds.  However, Windows 2008 is a little different.  It will give you some options including restoring from a recent backup or launching a command prompt.

I chose to launch the command prompt.  Immediately after opening the prompt, I simply changed my directory to "recovery" and ran "StartRep.exe".  It ran for a moment and after I restarted again I was able to boot my machine normally.  When it started back up, my OS disk was now showing as the full 40 GB in Windows.   


No comments:

Post a Comment