Page 1 of 2
Problems Resizing VDI
Posted: 14. Jul 2013, 06:33
by saeran
I'm trying to resize a VDI. I am doing so via the instructions here (can't post links, I'm a new member)
I type the following in to terminal "VBoxManage modifyhd /Volumes/Raid0Storage/VirtualBox/Win7v2.vdi --resize 60000"
But then I get this in return.
Saerans-Mac-Pro:~ Saeran$ VBoxManage modifyhd /Volumes/Raid0Storage/VirtualBox/Win7v2.vdi --resize 60000
VBoxManage: error: Could not find file for the medium '/Volumes/Raid0Storage/VirtualBox/Win7v2.vdi' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 220 of file VBoxManageDisk.cpp
Would appreciate some help.
Cheers
Re: Problems Resizing VDI
Posted: 14. Jul 2013, 12:15
by mpack
The message seems pretty clear: there is no such file with that path and name.
VirtualBox VMs are normally contained in a VM folder which has the name of the VM, and also inside a parent folder for all VMs, called "VirtualBox VMs" (that's on Windows hosts, it may vary on other hosts). In which case I would expect the VDI path to be :- "/Volumes/Raid0Storage/VirtualBox VMs/Win7v2/Win7v2.vdi". Note the quotes around the path because it contains a space.
Re: Problems Resizing VDI
Posted: 14. Jul 2013, 13:19
by loukingjr
You could look in the VirtualBox preferences and see where VirtualBox thinks the Default Machine Folders are suppose to be.
Re: Problems Resizing VDI
Posted: 14. Jul 2013, 17:05
by ciamurra
I'm trying to do the same thing. I used Terminal, and the command that finally worked is this
VBoxManage modifyhd Documents/VirtualBox/HardDisks/WindowsXP.vdi --resize 20480
Use that exact syntax and substitute the absolute path including the name and extension. Do not begin with User/<name> in the path.
Re: Problems Resizing VDI
Posted: 14. Jul 2013, 17:19
by mpack
ciamurra wrote:I'm trying to do the same thing. I used Terminal, and the command that finally worked is this
VBoxManage modifyhd Documents/VirtualBox/HardDisks/WindowsXP.vdi --resize 20480
Use that exact syntax and substitute the absolute path including the name and extension. Do not begin with User/<name> in the path.
Just to clarify, that example shows the use of an obsolete (v3.x and earlier) path to the VDI. Ignoring paths and looking at syntax, AFAICS the syntax is identical to what the OP already indicated he was using.
However the observation to use an absolute path is a good one - or at least "cd" into the correct folder and leave the path off altogether.
Re: Problems Resizing VDI
Posted: 15. Jul 2013, 00:58
by saeran
Appreciate the help but still no progress.
Editing the command to include quotation marks like one suggested however it made no difference...
Saerans-Mac-Pro:~ Saeran$ VBoxManage modifyhd "/Volumes/Raid0 Storage/VirtualBox/Win 7 v2.vdi" --resize 60000
VBoxManage: error: Could not find file for the medium '/Volumes/Raid0 Storage/VirtualBox/Win 7 v2.vdi' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 220 of file VBoxManageDisk.cpp
I'm definitly using the correct path. cl.ly/image/1E250Y411X2J (sorry can't make it a link, still not a member for one day)
NOTE: Names have been changed since my last post. I edited the names so there were no spaces, it helped but I figured quotation marks would work fine so I changed them back to their original names. The VM still runs fine, just can't resize it.
Re: Problems Resizing VDI
Posted: 15. Jul 2013, 01:26
by Perryg
Post the results of the following in a host terminal:
Code: Select all
VBoxManage list systemproperties | grep "Default machine folder"
or if grep does not work in a Mac use the following
Re: Problems Resizing VDI
Posted: 15. Jul 2013, 08:31
by saeran
Perryg wrote:Post the results of the following in a host terminal:
Code: Select all
VBoxManage list systemproperties | grep "Default machine folder"
or if grep does not work in a Mac use the following
Saerans-Mac-Pro:~ Saeran$ VBoxManage list systemproperties | grep "Default machine folder"
Default machine folder: /Volumes/Raid0 Storage/VirtualBox
Re: Problems Resizing VDI
Posted: 15. Jul 2013, 13:18
by noteirak
Your path doesn't contain the VM name, where it usually does. Are you sure the path is correct?
Re: Problems Resizing VDI
Posted: 15. Jul 2013, 13:33
by mpack
How about simply showing us a directory listing of "/Volumes/Raid0 Storage/VirtualBox".
Re: Problems Resizing VDI
Posted: 15. Jul 2013, 13:49
by loukingjr
I think the problem is he has a space in the name of one of the folders. Macs don't mind that. VirtualBox seems to.
edit: well I never had to resize a .vdi but on a Mac, the easiest way seems to be to drag the .vdi to the terminal, type VBoxManage modifyhd in the front of the path and --resize <the new size> at the end of the path and hit return.
Re: Problems Resizing VDI
Posted: 15. Jul 2013, 14:21
by noteirak
Actually the OS does, because space is a parameter delimiter in a command line.
But in this case the OP has used double quotes to enclose spaces, so it should work, given the fact the filename is correct of course.
Re: Problems Resizing VDI
Posted: 15. Jul 2013, 14:22
by loukingjr
see above. I edited my post.
Re: Problems Resizing VDI
Posted: 15. Jul 2013, 14:22
by mpack
No, VirtualBox doesn't care about spaces in folder names, in fact the standard machine folder name on Windows hosts contains a space, i.e. "VirtualBox VMs". I can't speak for other hosts.
Of course when using a command line a space is a separator, so to treat a string as a single unit when it contains spaces, you must wrap the string in quotes.
Note that the OP had no space in his first post, but in the example when he said that quotes didn't work, he did have a space. The default machine folder seems to have a space in it - though I haven't paid much attention to the default machine folder branch of this discussion, since it's a possible red herring: there is no need to assume that the VM is actually located there.
Re: Problems Resizing VDI
Posted: 15. Jul 2013, 14:27
by loukingjr
I just made a clone of one of my guests which has two spaces in it's name, dragged the .vdi file to a terminal window and did what I said above. works fine.
Code: Select all
louiss-imac:~ Mine$ VBoxManage modifyhd /Applications/VMs/antiX\ 12\ Clone/antiX\ 12\ Clone-disk1.vdi --resize 24000
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
louiss-imac:~ Mine$