Page 1 of 1
making VDI logical size smaller?!?
Posted: 29. Jun 2011, 17:11
by idundas
I messed up and expanded my C drive VDI for a Windows Server 2008 VM to 50TB instead of 50GB. Now the VM will not boot. Is there anyway to knock the VDI size back down to 50GB? This is the logical size I need to change. And no, I am an idiot and did not back up the VDI file before expanding it.
Re: making VDI logical size smaller?!?
Posted: 29. Jun 2011, 17:17
by Perryg
I know of no reliable way to shrink this. You might find a way but if you have the backup I would use it and resize to the proper size. Should be a whole lot faster.
Re: making VDI logical size smaller?!?
Posted: 29. Jun 2011, 19:26
by TiPo
Maybe this works
http://www.my-guides.net/en/content/view/122/26/
Although it's for enlarging, maybe you have to shrink the 50TB partition first with GParted before copying to the new vdi.
Re: making VDI logical size smaller?!?
Posted: 29. Jun 2011, 20:25
by Sasquatch
That can work, as long as the partition that you're going to copy isn't larger than the destination. So shrink it first if it is. And this time, do make a backup of the VDI first or you're going to install the Guest as new.
Re: making VDI logical size smaller?!?
Posted: 30. Jun 2011, 03:46
by idundas
Well, I managed to find an old backup of the VDI. Made a backup of it, expanded it using the vboxmanage modifyhd command line, and resized the partition with gparted without a hitch. I just have to repatch the OS and reinstall everything that was there. At least now I have a patched baseline I can always fall back to. I will have to try to "undo" the 50TB vdi file as I assume at somepoint in the future I will make a similar mistake and it will be a lot more critical.