0

I have a dynamic virtual disk has in a firt time has 5GB of virtual space, and this is the space that I can see when I go to properties of my drive (the virtual SO is wnidows XP).

I resize it with vboxmanage to 15GB, but when I start the virtual machine, in the properties of the drive I can see the same space, 5GB in total.

the new space is an alloacated partition? If this is true, how can I merge all the partitions of the virtual disk in one partition?

Thanks.

Álvaro García
  • 18,114
  • 30
  • 102
  • 193

3 Answers3

1

on Linux i resize my ( Win-VM ) partition on this way.

1) resize the vdi in commandline \ bash

VBoxManage modifyhd path/yourVMImage.vdi --resize 30000

( --resize, command to change the capacity in Megabyte )
( works only for VDI and VHD formats )

2) after this you have to extend your partition with an partition manager like gparted-live download it here

2.1) you have to start your virtual-machine with these live tool, then you can expand your partition using gparted-live.

2.1.1) for booting from gparted-live, you have to add another virtual hard disk, follow the steps described here

To add another virtual hard disk, or a CD/DVD or floppy drive, select the storage controller to which it should be added (IDE, SATA, SCSI, SAS, floppy controller) and then click on the "add disk" button below the tree. You can then either select "Add CD/DVD device" or "Add Hard Disk". (If you clicked on a floppy controller, you can add a floppy drive instead.) Alternatively, right-click on the storage controller and select a menu item there.

On the right part of the window, you can then set the following:

...You can select which image file to use.

stephanfriedrich
  • 563
  • 5
  • 20
0

Yes, the new size is an unllocated partition that must be merge with the existing partition. To do it it can be use any partition manager application.

Álvaro García
  • 18,114
  • 30
  • 102
  • 193
0

If your filesystem is using LVM. The final steps will be easy:

  1. lvextend /dev/vg_nile/lv_root /dev/sda2;
    #assuming vg_nile the name of virtual group, lv_root the logical volume and /dev/sda2 the new added partitions
  2. resize2fs /dev/vg_nile/lv_root
Raymond
  • 173
  • 2
  • 6