Increase disk size on the server for VirtualBox

  • Run command line with administrator rights (cmd), go to the folder C:Program FilesOracleVirtualBox

cd C:\Program files\Oracle\VirtualBox
  • Run command:

VBoxManage modifyhd «C:\Users\NameUser\VirtualBox VMs\Staffcop\Staffcop.vdi» --resize X

Where X - the number of MB to which you want to increase the disk space


The path to the drive can be seen in VirtualBox in the machine Settings -> Storage by selecting the full drive path .vdi. Disk size is set in MB

  • Download Gparted, see the footnote on Gparted at the end of the article.

  • Shut down the virtual machine with the server and disconnect the disk in Settings -> Storage

  • Create a new virtual machine

  • In the new virtual machine go to Settings -> Storage → Controller: IDE, then click Add optical disc drive, then connect the downloaded image Gparted, then select IDE Primary Master

  • Connect a virtual disk from the server’s virtual machine directory in Settings -> Storage -> Controller: SATA

  • Start a new virtual machine and log in to the operating environment with Gparted

  • Select the server virtual machine disk in Gparted, (for example: /dev/sdb1)

  • Delete linux-swap and expected partitions

  • Increase ext4 to maximum and click Apply.

  • Resize ext4, taking about 2000 MB of space from it

  • Create from free 2000 MB partition through the context menu Extended/Advanced

  • And create a partition with the file system/: linux-swap

  • Click Apply and exit the virtual machine with Gparted

  • Disconnect the server disk from the virtual machine and connect to the server virtual machine

  • Start the staffcop virtual machine and make sure that the disk size is increased by the command: df –h

  • Check the integrity of all data and network settings.


For Hyper-V and VMware virtual machines, the disk size is increased by configuring programs settings, and the logical partition size is increased similar to that in Gparted


All rights to the Gparted product belong to the gparted community, the link to the ISO image is local, because the sourceforge resource is very often unavailable.