[Solved] vboxmanage - resized to 50TB instead of 50GB

This is for discussing general topics about how to use VirtualBox.
Post Reply
aheberlein
Posts: 2
Joined: 1. Jul 2013, 17:14

[Solved] vboxmanage - resized to 50TB instead of 50GB

Post by aheberlein »

Hi,

accidently I resized a vdi-Image to 50TB instead of plannend 50GB using vboxmanage (dynamic drive).
Booting now leads to "Error loading operating system" (Win 7).

As I've read there is no way to shrink an image without booting the OS.
Does anybody have an idea how to fix this problem or to reverse the resizing?

Cheers
aheberlein
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: vboxmanage - resized to 50TB instead of 50GB

Post by mpack »

Only two cures that I know of.

1. Patch the VDI header using a hex editor to get it down to a usable size. Google for previous discussions of this problem and solution.

2. (Untested). Mount the VDI in another VM which also has a third VDI of the correct size attached. Copy the partition(s) plus the MBR from the damaged drive to the third VDI. Any disk imaging app is capable of doing the copy.
aheberlein
Posts: 2
Joined: 1. Jul 2013, 17:14

Re: vboxmanage - resized to 50TB instead of 50GB

Post by aheberlein »

Thanks for your reply!

I solved it creating a new vdi, then created the partitions using gparted.
chkdsk repaired the original partition to be cloneable and then I cloned them to the new vdi using Clonezilla.

Now it works again :D
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: [Solved] vboxmanage - resized to 50TB instead of 50GB

Post by mpack »

Glad to hear it, thanks for letting us know.
Post Reply