Page 1 of 1

using VBoxManage modifyhd

Posted: 29. Jun 2011, 14:22
by eyeman
Hi All

I am attempting to reduce the amount of HD space that my XP VM takes up on my Mac.

I followed the instructions re: defragging, and using sdelete, and so far, so good. When I go to my VM, (Clone of Windows XP 5-0.vdi), which is located on my Mac desktop, I keep getting errors:

~ eyeman27$ VBoxManage modifyhd "/Users/eyeman27/Desktop/Clone_of_Windows_XP_5-0.vdi" --compact
VBoxManage: error: Could not find file for the medium '/Users/eyeman27/Desktop/Clone_of_Windows_XP_5-0.vdi' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium, callee nsISupports
Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, AccessMode_ReadWrite, pMedium.asOutParam())" at line 209 of file VBoxManageDisk.cpp

An identical situation arises if I use the uuid instead of the file name

Any ideas?

PS The vdi was created from a .vmdk using Mpac's Clone VDI with "compact" checked...will doing the modifyhd shrink my VM size any more?

Re: using VBoxManage modifyhd

Posted: 29. Jun 2011, 21:31
by Martin
Are you sure that you don't have a typing error in the name? In Linux the file and path names are case sensitive.

Re: using VBoxManage modifyhd

Posted: 29. Jun 2011, 23:23
by Sasquatch
eyeman wrote:PS The vdi was created from a .vmdk using Mpac's Clone VDI with "compact" checked...will doing the modifyhd shrink my VM size any more?
Mpack's CloneVDI does the same as VBoxManage modifyhd --compact, so don't bother.

Re: using VBoxManage modifyhd

Posted: 30. Jun 2011, 11:46
by mpack
If it has already been compacted (which means to eliminate all "disk free space" sectors from the host file), then the only way to get further reduction is to delete a whole lot of unwanted files, particularly big ones, then let CloneVDI compact it again.

Naturally, make sure you have a working backup before you start.

There are tools online which help you identify the biggest space hogs on a drive, deleting these have the biggest effect. There are also sites which tell you how to streamline Windows - by deleting patch download folders etc, which can help a lot too.

Re: using VBoxManage modifyhd

Posted: 18. Jan 2012, 20:50
by eyeman
A belated thanks for developing CloneVDI. I have a new MacBook Pro, and have been playing around with resizing my W7 Vbox VM, to take advantage of the new computer's faster processing and increased HD space. Your program (run in Wine) has been invaluable in making the task of cloning and resizing partitions a cinch. Thanks again

Todd