VDI + Snapshots, how to make new and lean VDI?

This is for discussing general topics about how to use VirtualBox.
Post Reply
AntiMatter
Volunteer
Posts: 176
Joined: 2. Nov 2008, 06:48
Primary OS: Ubuntu 12.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: All Windows (x32 & x64), Linux
Location: Canada

VDI + Snapshots, how to make new and lean VDI?

Post by AntiMatter »

Hi,

Using VirtualBox 4.x, host = Windows 7 x64. A user has misunderstood Snapshot as a backup function. After several months there is now a few snapshots and the overall size of VDI + Snapshot files are pretty big. Let's assume I do defrag withing the Guest OS + zero the unoccupied free space by sdelete.

Is there a way to "export" the current state of the VM into another VDI. The new one will be a single VDI with zero snapshot and no bloat (VDI size roughly similar to the real size of the used space reported by the guest OS).

Thanks in advance for any help.
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: VDI + Snapshots, how to make new and lean VDI?

Post by mpack »

Just clone the VM, using the cloning feature built into VBox v4.1.x. Although I've not seen it myself (not being a snapshots user), at some point you'll see a dialog asking if you want to clone the current state or the entire VM. Choose current state, and the result will be a merged VDI inside a new VM. All the UUIDs will change of course, but that will be true regardless.
Post Reply