You specify a maximum disk size when you create a virtual hard disk in VirtualBox or VMware. Now, if you want more space on your virtual machine’s hard disk, you’ll have to enlarge the virtual hard disk and partition. Here is how:
To Enlarge a Virtual Disk in VirtualBox
(1) To enlarge a virtual disk in VirtualBox, you’ll need to use the VBoxManage command from a Command Prompt window.
(2) Shutdown the virtual machine and ensure its state is set to Powered Off, not Saved.
(3) Open a Command Prompt window from your Start menu and change to VirtualBox’s program files folder so you can run the command:
cd “C:\Program Files\Oracle\VirtualBox”
(4) The following command will operate on the VirtualBox virtual disk located at “C:\Users\Chris\VirtualBox VMs\Windows 7\Windows 7.vdi”. It will resize the virtual disk to 81920 MB (80 GB).
VBoxManage modifyhd “C:\Users\Chris\VirtualBox VMs\Windows 7\Windows 7.vdi” –resize 81920
(Use two dashes before resize in the command above.)
(5) Replace the file path in the command above with the location of the VirtualBox disk you want to resize and the number with the size you want to enlarge the image to (in MB).
To Enlarge a Virtual Disk in VMware
(1) To enlarge a virtual machine’s hard disk in VMware, power off the virtual machine, right-click it, and select Virtual Machine Settings.
(2) Select the virtual hard disk device in the list, click the Utilities button, and click Expand to expand the hard disk.
(3) Enter a larger maximum disk size and click the Expand button.
To Enlarge the Virtual Machine’s Partition
You now have a larger virtual hard disk. However, the operating system’s partition on your virtual hard disk is the same size, so you won’t be able to access any of this space yet.
You can use a GParted live CD to resize your virtual machine’s partition. Boot the GParted ISO image in your virtual machine and you’ll be taken to the GParted partition editor in a live Linux environment. GParted will be able to enlarge the partition on the virtual hard disk.
(1) Download the GParted live CD’s ISO file .
(2) Load the ISO file into your virtual machine by going into the virtual machine’s settings window, selecting your virtual CD drive, and browsing to the ISO file on your computer.
(3) Boot (or restart) your virtual machine after inserting the ISO image and the virtual machine will boot from the ISO image.
(4) GParted’s live CD will ask you several questions while booting – you can press Enter to skip them for the default options.
(5) Once GParted is booted, right-click the partition you want to enlarge and select Resize/Move.
(6) Specify a new size for the partition – for example, drag the slider all the way to the right to use all the available space for the partition.
(7) Click the Resize/Move button after you’ve specified the space you want to use.
(8) Click the Apply button to apply your changes and enlarge the partition.
(9) After the resize operation completes, restart your virtual machine and remove the GParted ISO file.
(10) Windows will check the file system in your virtual machine to ensure it’s working properly. Don’t interrupt this check.
(11) The virtual machine’s partition will now take up the entire virtual hard disk, so you’ll have access to the additional space.