[Solved] Assistance needed--cannot resize vdi

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
JMac3
Posts: 3
Joined: 10. Feb 2018, 22:41

[Solved] Assistance needed--cannot resize vdi

Post by JMac3 »

Hello all,

I am new to the forum and am glad that is available for folks like me. I'm using VirtualBox on my MacBook MacOS X Yosemite (10.10.5) and running Windows 10. I need to make the vdi larger, but I run into a problem when I try to run the commands in terminal. Here's what I see when I try it--please advise on how to fix it. Hopefully, it is something simple...

Code: Select all

JeffMcGillsAir:~ jeffmcgill$ VBoxManage modifyhd --resize 50000 ~/Users/jeffmcgill/VirtualBox VMs/W10/W10.vdi
Oracle VM VirtualBox Command Line Management Interface Version 5.2.6
(C) 2005-2018 Oracle Corporation
All rights reserved.

Usage:

VBoxManage modifymedium     [disk|dvd|floppy] <uuid|filename>
                            [--type normal|writethrough|immutable|shareable|
                                    readonly|multiattach]
                            [--autoreset on|off]
                            [--property <name=[value]>]
                            [--compact]
                            [--resize <megabytes>|--resizebyte <bytes>]
                            [--move <path]
                            [--description <description string>]

Syntax error: Invalid parameter 'VMs/W10/W10.vdi'
Thanks in advance for your assistance.
JMac3
Last edited by socratis on 11. Feb 2018, 08:10, edited 2 times in total.
Reason: Marked as [Solved].
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Assistance needed--cannot resize vdi

Post by socratis »

Your path contains a space (" "). You can't have a space in a command line for a path, because it separates arguments and/or modifiers. There are two ways you can do this. Either enclose the whole path in quotes:
  • VBoxManage modifyhd --resize 50000 "~/Users/jeffmcgill/VirtualBox VMs/W10/W10.vdi"
or "escape" the space, by using the escape character "\":
  • VBoxManage modifyhd --resize 50000 ~/Users/jeffmcgill/VirtualBox\ VMs/W10/W10.vdi
Do not use both the quotes and the escape character at the same time. An even easier way? After the "50000", drag and drop the VDI from the Finder to the Terminal. It will escape the path for you.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
JMac3
Posts: 3
Joined: 10. Feb 2018, 22:41

Re: Assistance needed--cannot resize vdi

Post by JMac3 »

Thanks for the reply. I have tried to do what you instructed, but have not been successful in my attempt. My results are below:

Code: Select all

JeffMcGillsAir:~ jeffmcgill$ VBoxManage modifyhd --resize 50000 ~/Users/jeffmcgill/VirtualBox\ VMs/W10/W10.vdi 
VBoxManage: error: Could not find file for the medium '/Users/jeffmcgill/Users/jeffmcgill/VirtualBox VMs/W10/W10.vdi' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 179 of file VBoxManageDisk.cpp
Again, thanks in advance for your assistance.

JMac3
Last edited by socratis on 11. Feb 2018, 06:46, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Assistance needed--cannot resize vdi

Post by socratis »

I should have noticed and warned you about it the first time...
The tilde character in Unix based systems translates to your home directory. In your case:
"~" translates to "/Users/jeffmcgill"
By using "~/Users/jeffmcgill", that translates to "/Users/jeffmcgill/Users/jeffmcgill", a path that doesn't exist. Remove the "~" from the beginning of the path.

Also, start reading the error messages when you make a mistake. They usually tell you what's wrong.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
JMac3
Posts: 3
Joined: 10. Feb 2018, 22:41

Re: Assistance needed--cannot resize vdi

Post by JMac3 »

Socratis,

Thanks for the tips! Success!

Code: Select all

JeffMcGillsAir:~ jeffmcgill$ VBoxManage modifyhd --resize 50000 /Users/jeffmcgill/VirtualBox\ VMs/W10/W10.vdi 
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
JeffMcGillsAir:~ jeffmcgill$ 
Then used GParted Live CD to enlarge the partition. Thanks so much for your help. Now I have more room to work and the knowledge to expand it later if I need to.

JMac3
Last edited by socratis on 11. Feb 2018, 08:09, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Assistance needed--cannot resize vdi

Post by socratis »

Glad you got it going. Marking as [Solved].
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply