resize the virtualbox vdi, while the file is on the external hard drive

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
clsa
Posts: 2
Joined: 16. Jul 2017, 16:34

resize the virtualbox vdi, while the file is on the external hard drive

Post by clsa »

directory of my vdi file
directory of my vdi file
WX20170716-121504.png (71.11 KiB) Viewed 5687 times
Hello, I want to increase the size of the windows10 vm, and I have done that before. However, a couple days ago, I moved my windows10 vm to an external hard drive. And when I try to increase the size this time, I got following errors.

LuWeichendeMacBook-Air:~ luweichen$ VBoxManage modifyhd --resize 100000 ~/Volumes/G-DRIVE\ mobile\ USB/VirtualBox\ VMs/win\ 10/win\ 10.vdi
VBoxManage: error: Could not find file for the medium '/Users/luweichen/Volumes/G-DRIVE mobile USB/VirtualBox VMs/win 10/win 10.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

Can someone help me plz. Thx
Last edited by clsa on 16. Jul 2017, 18:16, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: resize the virtualbox vdi, while the file is on the external hard drive

Post by mpack »

Please post a screenshot of your hosts file browser window opened to that folder. Or, listing the folder in a terminal window would be just as good.

I.e. please prove that the error message is wrong, and that file really is at that location.
socratis
Site Moderator
Posts: 27329
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: resize the virtualbox vdi, while the file is on the external hard drive

Post by socratis »

I'll focus on the part of the command line that's wrong:
VBoxManage modifyhd --resize 100000 ~/Volumes/G-DRIVE...
Do you see that tilde (~) in front of the "/Volumes/..."? That shouldn't be there. That tilde translates to "your home directory". And your VDI is not in your home directory, it's in the "G-DRIVE...". i.e. "/Volumes/G-DRIVE...".
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.
clsa
Posts: 2
Joined: 16. Jul 2017, 16:34

Re: resize the virtualbox vdi, while the file is on the external hard drive

Post by clsa »

That works. Thx a lot
BobOra
Posts: 12
Joined: 24. Aug 2016, 19:56

Re: resize the virtualbox vdi, while the file is on the external hard drive

Post by BobOra »

I'm getting an error in trying to resize a Windows 10 guest .vdi under macOS 10.12.6. I've dragged the .vdi file into Terminal, and surrounded it with quotes. I usually have success with this form of an escaped path name, but wanted to check if that is the correct method. Secondly, the first recipe I used (from other parts of the forums) places the full path after "modifyhd"; however in this thread, it appears the path is at the end. I tried it at the end as well, but this did not change the results.

$ VBoxManage modifyhd "/Users/bob/VirtualBox\ VMs/Windows\ 10\ Enterprise\ 64-bit/Windows\ 10\ Enterprise\ 64-bit.vdi" --resize 35000

VBoxManage: error: Could not find file for the medium '/Users/bob/VirtualBox\ VMs/Windows\ 10\ Enterprise\ 64-bit/Windows\ 10\ Enterprise\ 64-bit.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

thanks

Bob
BobOra
Posts: 12
Joined: 24. Aug 2016, 19:56

Re: resize the virtualbox vdi, while the file is on the external hard drive

Post by BobOra »

I just tried running the command without quotes surrounding the path, and it worked.

Bob
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: resize the virtualbox vdi, while the file is on the external hard drive

Post by mpack »

BobOra wrote:I just tried running the command without quotes surrounding the path, and it worked.
I'm no expert on OS X command line, but looking at the syntax you were using I would expect that you should either "escape" the spaces as you were doing, or you surround the string in quotes. Not both.
BobOra
Posts: 12
Joined: 24. Aug 2016, 19:56

Re: resize the virtualbox vdi, while the file is on the external hard drive

Post by BobOra »

I believe you are correct. It has been a long while, and I'd forgotten the usage.
Post Reply