[vbox-dev] reduce the size of vdi file

Rajiv Jaisankar rajiv.jaisankar at altair.com
Thu Mar 21 02:38:18 PDT 2013




I am using Virtualbox 4.1.18. Virtualbox installed in windows7 64-bit,
vm running in linux 64-bit. One of my VM's VDI file has grown really
big. Inside the vm, (in the linux machine) Ihave used only 10GB. But the
VDI is 20GB. I have never used snapshots for this VM. Is there any way
to reduce the size of vdi file? Can I run sdelete on the VDI file?
(http://technet.microsoft.com/en-us/sysinternals/bb897443)  (or) use
http://www.feyrer.de/g4u/nullfile-1.02.exe (or)  use VBoxManage modifyhd
-compact option?



I tried the third option in my env. Was getting below error executing
modifyhd -compact. All vms are created as the same user. Should I run
this command as Administrator user?


C:\Users\rajivj>VBoxManage modifyhd "C:\users\rajivj\VirtualBox
VMs\server1" -compact 


VBoxManage.exe: error: Permission problem accessing the file for the
medium 'C:\

users\rajivj\VirtualBox VMs\server1' (VERR_ACCESS_DENIED)

VBoxManage.exe: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004),
component M

edium, interface IMedium, callee IUnknown

Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType,

rite, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 210 of file







-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20130321/60fbbeb4/attachment.html 

More information about the vbox-dev mailing list