Smaller disk file for Windows Guest

Discussions about using Windows guests in VirtualBox.
Post Reply
markd89
Posts: 34
Joined: 4. Sep 2016, 22:54

Smaller disk file for Windows Guest

Post by markd89 »

Hi,

I have a Windows 7 Guest with 75GB of space in use on drive C.

In my Linux host, there is a 117GB VMDK file. I'd like to reclaim some of that space.

I'm open to converting the VMDK to another format.

I'd appreciate any suggestions.

Thanks!

Mark
wintercurrants
Posts: 1
Joined: 22. Dec 2023, 10:54
Primary OS: MS Windows Vista
VBox Version: OSE self-compiled
Guest OSses: Windows
Contact:

Re: Smaller disk file for Windows Guest

Post by wintercurrants »

Have any updates? I have the same question.

Many thanks!
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Smaller disk file for Windows Guest

Post by scottgus1 »

Sorry for missing this topic!

You'll need to compact the disk file. If you're willing to convert the disk file to .vdi format, then Mpack's CloneVDI is the easiest way. It makes a copy of the disk file and compacts the copy, leaving the original as it is, in case something goes wrong on the commodity PC hardware most of us use.

Virtualbox has a built-in compacting command, but it works on the original, not a copy (so back up the original!) and requires zero-filling the original as a pre-step. See "VBoxManage modifymedium" with the "--compact" option in the manual.
markd89
Posts: 34
Joined: 4. Sep 2016, 22:54

Re: Smaller disk file for Windows Guest

Post by markd89 »

I'm running a Linux host so can't use CloneVDI.

Here's what I did:

1. Boot the VM with GPARTED ISO and resize the virtual disk smaller.
2. Clone the VM to a VDI disk (not sure this step was needed - was on VMDK before) and then remaining steps on that clone.
3. Buy & install EaseUS Todo Backup Home (got a deal for $23)
4. Add a new smaller vitual disk to the VM which is large enough to fit the data.
5. Use EaseUS to clone to new disk. This simulates when you have a Windows PC and get a new hard drive.
6. Remove the old virtual disk from the VM and boot to the new Virtual disk.
7. Re-activate various software which broke due to them detecting being on a "different PC"

I would liked to have done this with all Open Source stuff, but spending money on EaseUS seemed like it was going to save me additional wasted hours. I would like if CloneVDI was one day ported to run on Linux hosts.

Hope this helps!

Mark
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Smaller disk file for Windows Guest

Post by scottgus1 »

Thanks for your report. Glad you're up and running!

FWIW I didn't notice the Linux host, but CloneVDI works on Linux under Wine, apparently, see viewtopic.php?t=22437
Post Reply