sudo mount -t vboxsf -o uid=1000,gid=1000 <sharename> <mountpoint>
Courtesy of Shrink Windows Guest VDI.
-
Boot up your windows guest and uninstall/delete all unwanted programs and files
-
Defragment the disk using Windows built-in defragment tool.
-
Zero-out unused sectors:
Download the latest version of SDelete tool from SysInternals and Extract sdelete zip to c:
(or what ever drive your shrinking).
Click Start> Run and type cmd. in the command prompt type:
c:\sdelete.exe -z c:
-
Shutdown the windows guest
-
Run the following command on the linux host (windows virtual box has a similar command and syntax):
VBoxManage modifyhd /path/to/disk.vdi compact
Symbolic link creation from within a guest has been disabled in VirtualBox 4.1.8 for security reasons. A guest could create symbolic links which point outside the assigned host directory. This has nothing to do with any ext3/ext4 bug. And the guest is still able to read symlinks which are created on the host.
VBoxManage setextradata VM_NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1