Page 1 of 1
vBoxManage modifyhd error
Posted: 7. Aug 2014, 19:46
by Anunes
I am trying to "compact" a VDI file using the command "VBoxManage modifyvdi xxxx.vdi compact ", but I get "Syntax error : Invalid Command" error.
Instead of "modifyvdi" I also have tried "modifyhd" but same error.
Any idea of what I am doing wrong?
Host : Win 8.1 64bit
VB: 4.3.12+AddOn´s
error message: Syntax Error : Invalid Command ´vboxmanage`
Exact comand as I type in DOS Window: "c:\program files\oracle\virtualbox\"vboxmanage modifyhd "clone of mytestvm".vdi --compact
I have tried several combinations of dashes, but always the same error.
Re: vBoxManage modifyhd error
Posted: 8. Aug 2014, 11:45
by socratis
"c:\program files\oracle\virtualbox\"vboxmanage modifyhd "clone of mytestvm".vdi --compact
It should be:
"c:\program files\oracle\virtualbox\vboxmanage" modifyhd "clone of mytestvm.vdi" --compact
Basically, the whole path to the command (c:\program files\oracle\virtualbox\vboxmanage) should be enclosed in quotes as well as the argument (clone of mytestvm.vdi). What you did is that you left the 'vboxmanage' outside the quotes and it was thought to be an argument, hence the error message.
Re: vBoxManage modifyhd error
Posted: 8. Aug 2014, 11:59
by loukingjr
socratis is correct of course. Any time you get a syntax error in the terminal it means you typed in the command incorrectly.
Re: vBoxManage modifyhd error
Posted: 8. Aug 2014, 12:50
by mpack
Moved to "Windows Hosts" since the discussion is not generic enough for "Using VirtualBox".
I'm also curious: "clone of mytest.vdi" suggests that CloneVDI was used to make the clone, in which case CloneVDI can also be used to compact the clone without all this faffing around with VBoxManage!
Re: vBoxManage modifyhd error
Posted: 8. Aug 2014, 13:05
by socratis
Yes, if you've noticed, Anunes has been involved in both modifyhd and CloneVDI threads. My guess (call it romantic) is that s/he's trying to learn from every available source. Two thumbs up! Of course I'm a think-positive person

Re: vBoxManage modifyhd error
Posted: 8. Aug 2014, 13:45
by Anunes
socratis wrote:Yes, if you've noticed, Anunes has been involved in both modifyhd and CloneVDI threads. My guess (call it romantic) is that s/he's trying to learn from every available source. Two thumbs up! Of course I'm a think-positive person

@socratis: Very good guess! I am just finished with the Basic learning with VirtualBox.
I have tried the command with the quotes as you said in the above post and it works. Thank you.
@mpack: At the time I used CloneVDI+ compact option I did not had cleaned before the system , defragmented, used "sdelete" as mentioned in the tutorial how to reduce VDI file size.
Now I did all that things and at the end I issued the compact command with VBoxManage.
Indeed it is not necessary to do all that, there is only a very, very small decrease of the file size. Now I know it.
Re: vBoxManage modifyhd error
Posted: 12. Mar 2015, 10:58
by Jaybarbelo
My first ever post here, hope i have the right location. Please redirect me if wrong.
I am trying to resize a dynamically allocated windows gust vm in windows host. keep getting a syntax error. The path to the file i pasted from explorer. Can anyone spot an error? Its the latest version of Vbox as you can see
C:\Program Files\Oracle\VirtualBox>VBoxManage modifyhd "C:\Users\jb\jb\VM\Win7_64\Win7.vdi" --resize 40960
Oracle VM VirtualBox Command Line Management Interface Version 4.3.24
(C) 2005-2015 Oracle Corporation
All rights reserved.
Usage:
VBoxManage modifyhd <uuid|filename>
[--type normal|writethrough|immutable|shareable|
readonly|multiattach]
[--autoreset on|off]
[--property <name=[value]>]
[--compact]
[--resize <megabytes>|--resizebyte <bytes>]
Syntax error: Invalid parameter '--resize'
Re: vBoxManage modifyhd error
Posted: 12. Mar 2015, 14:57
by mpack
That doesn't make sense. The "--resize" command has been available since 4.1.0. I've only seen something like this when the front end finds another executable along the path that's from the wrong VBox version. You haven't been copying VirtualBox executables around have you? I do notice that your VM is not in a standard location.
Does this VM run from where it is now, on this same host?
If all else fails then you might find
CloneVDI easier to use for this task.
Re: vBoxManage modifyhd error
Posted: 12. Mar 2015, 16:07
by Jaybarbelo
I do have Andy installed
But also; I upgraded Virtualbox after I installed Andy
All my vm's are working ok.
And Andy is working. I installed Andy as I could not get Android x86 Lollipop to boot in virtual box (not solved that yet, but have done this successfully before)
I will go for the other method of copying the vm hd to a larger hd
Vbox v 4.3.24
Host: Win8
Guests (working): Win 7, Mint17KDE, Mageia 4, Zorin 9, WinXP.
Re: vBoxManage modifyhd error
Posted: 12. Mar 2015, 16:15
by mpack
I'm not sure why you provided that information: the guest OS is not relevant to discussion about VBoxManage errors on your host. The resize is working at the disk sector level, it doesn't care about filesystems (though you might, if you want the guest OS to use the additional space). Even that isn't relevant since you aren't even getting that far.
Re: vBoxManage modifyhd error
Posted: 14. Mar 2015, 05:09
by Jaybarbelo
Thanks mpack, CloneVDI is very good.