in virtualbox ~ read.

Extending a VirtualBox vmdk file

It's a simple process that consists of cloning the vmdk file, formatting it to vdi, resizing it, and then cloning it back to vmdk (if that's the type you want to keep). I ended up keeping the vdi format.

Run the following commands in the folder that contains the vmdk file you want to resize. Assuming you want to resize to 70GB (70 * 1024)

VBoxManage clonehd "myfile.vmdk" "cloned.vdi" --format vdi  
VBoxManage modifyhd "cloned.vdi" --resize 71680  
VBoxManage clonehd "cloned.vdi" "final.vmdk" --format vmdk  

At this point you will want to attach "final.vmdk" to your VM. If you're running a Windows VM you will still need to resize the drive to take advantage of the new allocated space. Start your VM and go to "Disk Management" (on Windows 10 just right click on the Start logo and select Disk Management from the list). Right-click on the drive you want to resize (in my case it is "C:") and choose "Extend Volume". Follow the prompts and you're done.

comments powered by Disqus