Truecrypt encrypted virtual machine and compacting VDI

Discussions about using Windows guests in VirtualBox.
Post Reply
stephen_liu
Posts: 7
Joined: 31. Oct 2010, 23:27
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows XP

Truecrypt encrypted virtual machine and compacting VDI

Post by stephen_liu »

When I encrypt a Windows XP 32-bit virtual machine with Truecrypt 7.0a, it takes up the full space that was alloted to the VDI (I'm using a dynamic VDI) even though I'm really using less than half. Compacting it doesn't recover any space.

I have a similar dmcrypted Ubuntu machine that I've allocated 500GB for in a dynamic VDI. It is only using 12GB or so after the initial install.

Any idea why the Truecrypt encrypted Windows XP machine shows all the space that is allocated to the VDI as used?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Truecrypt encrypted virtual machine and compacting VDI

Post by vbox4me2 »

This is normal behaviour as the outside(vbox) can't 'see' whats used inside(vm) anymore, even partition tables are invisible.
wacher
Posts: 82
Joined: 26. Mar 2011, 04:47
Primary OS: Linux other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10 Insider

Re: Truecrypt encrypted virtual machine and compacting VDI

Post by wacher »

The encrypted "488GB nothing" is not "488GB nothing" anymore, but 488GB data to store.
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: Truecrypt encrypted virtual machine and compacting VDI

Post by mpack »

stephen_liu wrote:Compacting it doesn't recover any space.
With what tool?, and give complete procedure please.
sej7278
Volunteer
Posts: 1003
Joined: 5. Sep 2008, 14:40
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Solaris, Linux, Windows, OS/2, MacOSX, FreeBSD
Contact:

Re: Truecrypt encrypted virtual machine and compacting VDI

Post by sej7278 »

wacher has it right - truecrypt fills its container with random junk for deniability, so your empty vdi is not empty but full, and as its random and not just zeroes it will not shrink.

dmcrypt/luks etc. on linux just encrypt the data as it comes in, there's no deniability, which is why its recommended to fill your partition with /dev/random first, otherwise you've just got empty blocks (which can be shrunk).
Post Reply