VirtualBox 5.1.18 Mac OS X Host / Windows 10 Guest Shrink HD

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
CraigMurray
Posts: 1
Joined: 27. Apr 2017, 19:52

VirtualBox 5.1.18 Mac OS X Host / Windows 10 Guest Shrink HD

Post by CraigMurray »

I have a windows 10 VBox that is up and running. When i created it i set the vdi to be too large (200gb). I need to shrink it down so i can move it to another disk. I am using very little of the drive inside of the Windows 10 guest. Is there a way to resize the disk within the windows 10 guest and then resize the vdi to a smaller size? Thank you in advance for any help.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox 5.1.18 Mac OS X Host / Windows 10 Guest Shrink HD

Post by mpack »

Use the Disk Management feature inside the Win10 guest to shrink the drive down to something reasonable. Don't make it too small (about 3-4 times your current level would be good).

Then clone the VDI using CloneVDI. Tick the "Compact" and "Keep UUID" checkboxes. The clone VDI will be a drop in replacement for the old one, but should be smaller (how much smaller depends on how large the VDI file is now).

The drive will retain the logical size of 200GB, but unpartitioned areas will be inaccessible and therefore the VDI file can't grow due to writes in that area.

Don't attempt this without further discussion if you have used snapshots.
Post Reply