If you are using a VirtualBox and you need to resize your virtual hard disks then follow the steps carefully.

1. You check the installation folder of Virtual Box.

eg: "C:\Program Files\Oracle\VirtualBox"

2. Open Start->Run type cmd and open command prompt.

3. Set path of your virtualbox installation folder.

eg: "path =C:\Program Files\Oracle\VirtualBox"

(This will help you execute all the executables in this folder from any location)

4. Find your virtual HardDisk folder.

Finding VHD Location open VirtaulBox and select the Virtual Machine and click the Settings

In the right gray area you can find the details of Virtual HDD

5. FInd the location and go to the Command Promt and change the location to Virtual HDD.

eg: K:\VMS>

6. In command prompt

type >vboxmanage to get the details of functions available with vboxmanage.exe

In our case we need to resize the Virtual HDD ie. Increase od Decrease the size of HDD.

Type "VBoxManage modifyhd" to get the Usage and parameters of the command:

VBoxManage modifyhd         <uuid>|<filename>
                            [--type normal|writethrough|immutable|shareable|
                                    readonly|multiattach]
                            [--autoreset on|off]
                            [--compact]
                            [--resize <megabytes>|--resizebyte <bytes>]

7. For changing the size based on the above example.

K:\VMS>VBoxManage modifyhd <Virtual Harddisk Name> --resize <Modified Size in MB>

eg :K:\VMS>VBoxManage modifyhd Ubuntu.vdi --resize 15500

Thats all you completed the operation.

8. For verifying this open VirtualBox->Select Virtual Machin->Click Settings->Select Storage->Click the Virtual disk and check the right side to see the chage.

9. The added space is available as free space in your hard disk. For adding this free space to your partition you must use the help of any one of the partitioning tools which support the functionality of resizing.

10. Use a Boot CD and use the partition tool and resize the partition and add the free space to the existing partition.