5

I want to expand the size of my Windows VM under VirtualBox. I expanded the size of the volume following the steps here, that is,

VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MB

but I am unable to expand the partition in the guest VM. "Extend volume" is grayed out. How to proceed?

Here is a screen shot of my guest OS Disk Management.

guest OS Disk Management

eric s
  • 183

2 Answers2

5
  1. PLEASE BACKUP YOUR VDI FILE (VIRTUAL HARD DISK) FIRST
  2. boot the guest OS and open Disk Management again
  3. delete the recovery partition
  4. right click on the C partition
  5. from the context menu select Extend volume
  6. Increase the size to accommodate the one you added. See here for images, starting from step 5 or 6.

After that your Windows partition size should have increased.

wjandrea
  • 14,236
  • 4
  • 48
  • 98
George Udosen
  • 36,677
  • @wjandrea, just make a copy of the original and put it some where in case it get corrupted when you resize. For the recovery partition I don;t think he needs to do anything just follow the steps if it goes bad then the copy made will be reused. – George Udosen Dec 03 '16 at 02:44
  • So, delete the recovery partition? – wjandrea Dec 03 '16 at 02:46
  • @wjandrea, the backup is from the host OS not the guest. Just make a copy of it in the host OS. – George Udosen Dec 03 '16 at 02:48
  • I don't think he needs to delete it as his target is the 5GB he created which is at the end of the disk partitions as can be seen from his image. He should just expand his C drive to add the 5GB space. – George Udosen Dec 03 '16 at 02:54
  • 1
    You can't expand an NTFS partition into non-contiguous space. – wjandrea Dec 03 '16 at 02:56
  • Well @wjandrea that how I added space to my window 10 running on my VM but I am not an expert. Please what do you mean by non-contiguous space? I wish the owner of the original post would respond so we know if he was able. Please you could start a chart I would like that. – George Udosen Dec 03 '16 at 03:01
  • Sorry for the late reply. I had difficulties removing the recovery partition, but was later able to delete the recovery partition and resize the main volume using AOMEI Partition Assistant. – eric s Dec 04 '16 at 15:52
0

You need contiguous space to expand any partition. I would go into gparted, create a 450 MB partition at the disk, and then move the recovery partition to that new partition, or delete it if you don't need it.

Once you have free space adjacent to the windows partition, you should be able to expand it to incorporate that free space. I'm not sure, but you may need to then go into Windows to the disk manager and tell it to use the full size of the disk.

Marty Fried
  • 18,466