Skip to content

Instantly share code, notes, and snippets.

@bellerbrock
Last active December 7, 2017 03:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bellerbrock/1529b2461f96b1cb3b9a3f84064b06f2 to your computer and use it in GitHub Desktop.
Save bellerbrock/1529b2461f96b1cb3b9a3f84064b06f2 to your computer and use it in GitHub Desktop.
Make sure your VM is shut down!
1. In your virtualbox folder, find the correct disk image. If it isn't already a vdi, convert it:
`VBoxManage clonehd box-disk1.vmdk box-disk1.vdi --format vdi`
2. Enlarge the vdi file.
The number you give as an argument is in MB, or GB times 1024. In this case 250GB * 1024 MB/GB = 256000:
`VBoxManage modifyhd box-disk1.vdi --resize 256000`
3. Open VirtualBox manager and click on the New icon in the top left to create a new machine. After naming it and picking the amount of memory,
select the `Use an exisitng virtual hard disk file` option and navigate to the vdi file you created.
4. Download gparted iso file, and go to the settings of your new machine. Mount it as cd
5. start machine, it will boot into gparted live, Use gparted to expand virtual hd into unallocated space (in this case will be about 240GB)
6. shutdown, remove gparted iso, and restart the machine. Once you verify it is working correctly, delete the old machine and it's files. You're done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment