My host system is running OSX El Capitan 10.11.5 and VirtualBox 5.0.22 r108108
Using the information found in another answer, I was successfully able to extract an ISO of my host operating system and install it as a guest OS in a VirtualBox VM. I had to leave the settings of my VM as the defaults during creation, which led me to only have a hard disk size of 20GB, but I have successfully booted into the guest OS and have a partition of 20GB.
Now I want to increase the size of my virtual hard disk to 40GB. I used the following command to modify the vdi file:
VBoxManage modifyhd test1.vdi --resize 40960
However, Disk Utility is unable to recognize that the drive is now 40GB and I am unable to expand the partition. I have tried both the Disk Utility program after a full boot as well as the Disk Utility present on the ISO when I boot from it.
How do I get the OSX guest OS to recognize a larger hard drive and expand the partition accordingly?