My overall problem is that I filled my current virtual hard drive, so I want to move everything over to a larger VDI file and boot from that one instead.

If it matters, I have XP host and Crunchbang (based on Debian statler) guest, VirtualBox version 4.1.2r73507.

I first tried this guide, but after dd'ing the contents of /dev/sda1, gparted couldn't tell that there was a smaller partition on the larger disk. But, I did have all of /dev/sda1 copied to /dev/sdb1, the only problem was that /dev/sdb1 thought it only had 8 GB, not 32.

Then I discovered fsarchiver, which claims to be able to restore archive files to larger partitions, so I created an archive of /dev/sdb1 with

fsarchiver savefs -A /media/sf_C_DRIVE/temp/backup.fsa /dev/sdb1

Then I wiped out /dev/sdb1 with gparted (reformatted the whole thing as ext4) and restored the archive file with

fsarchiver restfs /media/sf_C_DRIVE/temp/backup.fsa id=0,dest=/dev/sdb1

And according to df, I think that worked. It shows roughly the same number of blocks used, but a much smaller % used. But, when I go into the virtual machine settings and switch the larger drive in as Primary Master, I can't boot (not even GRUB)

To make things worse, I decided to boot the machine from a LiveCD, clear /dev/sdb1 again, recreate the archive (this time from the real /dev/sda1), and restfs /dev/sdb1. Unfortunately, I wasn't paying attention, so I wiped /dev/sda1. Without Guest Additions on the LiveCD, I can't access the fsa file in C:\temp to restore the image to either VDI file.

Any suggestions?


Instead of copying, just make the existing virtual drive file larger then boot the vm ( possibly from a livecd ) and add/extend partitions.

  • I'd love to be able to do that. Do you have any specific instructions? Everything I found said it's not possible. – Nate Parsons Feb 21 '12 at 3:40
  • I don't use virtualbox, but it is quite simple with other virtual machines like vmware, qemu or xen, so I can't imagine that virtualbox can't do it. – psusi Feb 21 '12 at 3:43
  • BTW, you were right. Buried in the manual is vboxmanage modifyhd (virtualbox.org/manual/ch08.html#vboxmanage-modifyvdi) – Nate Parsons Mar 18 '12 at 14:03
  • @NateParsons here is the guide: derekmolloy.ie/resize-a-virtualbox-disk Nutshell: it needs gparted installed as an .iso for you to run in VBox. Make a new linux VM and use gparted.iso as the installation media, this runs its own mini-virtualmachine where u can attach your .vdi and make it bigger. – hello_there_andy Jul 29 '19 at 1:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.