Welcome to RHPConsulting.NET Sign in | Join | Help

Extending a Virtual Hard Disk - Extendiendo un Disco Virtual

I was playing around with Windows Server 2008, and Team Foundation Server in a Virtual Machine (VirtualPC 2007 SP1) environment when the darndest thing happened, I ran out of disk space in the virtual hard drive.  My first reaction was, "ok let's start from a scratch", but honestly, I just don't have the time to do so.  The project that I am currently working on has deadlines, and I'm a father of two beautiful daughters who deserve my time.  Therefore, I can't be investing much time in this R&D task. 

I decided to hit the Google Machine for information, and I found this link that solved all my problems. One thing that I didn't like about the original blogger's post was that it did not provide detailed step-by-step instructions on how to use both the tool provided by the vmToolKit website or the DiskPart utility.   Having said that, the following is a step by step on how to deal with this issue:

1. - Download the VHDResizer tool from the vmToolKit website. 
2. - Use VHDResizer to create a sector by sector copy of the original VHD while changing the VHD Size.  Important: this will not resize the partition on that drive, it will only give you additional disk space on the VHD so that can be use the Diskpart utility to extend the partition.
3. - Add the new VHD file to you're existing Virtual Machine.  Important: do not remove the existing VHD, what you want to do is add the new VHD drive so you can boot up with you're existing configuration and use the DiskPart utility to expand that drive.  This step is needed because of limitations built in to the DiskPart utility. The Diskpart utility will not extend a system or boot partition.
4. - Boot up the VM and execute the following commands from an command console.  Important: X is the volume number for the drive you want to extend.
        C:\>DiskPart
        DISKPART> LIST VOLUME
        DISKPART> SELECT VOLUME X
        DISKPART> EXTEND
        DISKPART> EXIT
5. - Shutdown you're VM, and change settings so that from now on it boots from the new VHD that has all the available you neede.

Thanks/Regards,
_____________
Roberto Hernández-Pou
MCAD MCSD.NET MCT MCDBA MCSE


Estaba jugando con Windows Server 2008, y Team Foundation Server en una máquina virtual (VirtualPC 2007 SP1) cuando me sucedió lo  menos esperado, se me acabó el espacio en el disco virtual. Mi primera reacción fue, "vamos a comenzar desde cero", pero sinceramente no tengo el tiempo que se le necesita dedicar. El proyecto en que estoy trabajando actualmente tiene fechas de entrega y, adicionalmente soy el padre de dos hermosas niñas que merecen de mi tiempo. En otras palabras, no puedo dedicarle tanto tiempo a un proyecto de investigación y desarrollo.

Decidí ahorrarme un poco de tiempo usando el fabuloso Google, que me trajo al siguiente vínculo que honestamente resolvió todos mis problemas.  Pero, una cosa que no me gustó de la publicación original es que no provee instrucciones paso a paso de como utilizar las herramientas que nos facilita el vmToolKit y DiskPart. Habiendo establecido esto, la siguiente es una lista de instrucciones que explica paso a paso como solucionar el problema:

1. - Descargue la herramienta VHDResizer del sitio en internet vmToolKit. 
2. - Utilice el VHDResizer para crear una copia sector por sector del disco original, especificando el nuevo tamaño del disco.  Importante: esta operación no cambia el tamaño de la partición, solo le agrega el espacio al disco virtual nuevo para utilizar Diskpart y asignarle el nuevo espacio disponible.
3. - Añadir el nuevo disco virtual a la máquina virtual.  Importante: no remueva el disco original, lo que debe hacer es añadirlo como un nuevo disco para poder encender la maquina virtual y utilizar la herramienta Diskpart para extender el tamaño del disco.  Este paso es necesario por limitaciones existentes en la herramienta, Diskpart no permite extender particiones 'system' or 'boot'.
4. - Encienda la máquina virtual y ejecute los siguientes comandos en una consola del sistema operativo. Importante: X es el número del volumen nuevo que usted quiere extender.
        C:\>DiskPart
        DISKPART> LIST VOLUME
        DISKPART> SELECT VOLUME X
        DISKPART> EXTEND
        DISKPART> EXIT
5. - Apague la máquina virtual, y cambie la configuración para poder correr desde la nueva partición que ahora tiene todo el espacio que usted necesita.

Gracias/Disfruten,
_____________
Roberto Hernández-Pou
MCAD MCSD.NET MCT MCDBA MCSE

Published Friday, May 23, 2008 5:44 PM by rhernandez

Comments

No Comments

Anonymous comments are disabled