1

I want to increase the size of my virtual machine. Having read these

https://stackoverflow.com/questions/11659005/how-to-resize-a-virtualbox-vmdk-file

How to change fixed size VDI with modifyhd command in Windows?

I cloned the vmdk file into vdi. However, when using

VBoxManage.exe modifyhd cloned.vdi --resize 102400

I received the error message

VBoxManage.exe: error: Could not find file for the medium 'C:\Program Files\Oracle\VirtualBox\cloned.vdi' (VERR_FILE_NOT_FOUND)
VBoxManage.exe: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium, callee IUnknown
VBoxManage.exe: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 179 of file VBoxManageDisk.cpp

How should I proceed?

Lafayette
  • 183
  • 3
  • 11
  • is the location of cloned.vdi indeed `C:\Program Files\Oracle\VirtualBox\cloned.vdi` or is that file stored somewhere else? If the latter, you need to supply the full path of the file and use quotes, eg `vboxmanage.exe modifyhd "c:\temp\cloned.vdi" --resize 102400`. Do note, that by default your vdi is stored in `%appdata%\VirtualBox\...` or something. – LPChip Mar 12 '18 at 14:27
  • Thanks, but the location is indeed `C:\Program Files\Oracle\VirtualBox\` I created the temporary .vdi file there for ease of use. – Lafayette Mar 12 '18 at 14:41
  • How did you clone the file and did you move it afterwards? Copying will not work, given that each vdi needs to be registered with VirtualBox. – LPChip Mar 12 '18 at 15:55
  • Indeed, that was my problem - copying the file. – Lafayette Mar 13 '18 at 08:38

1 Answers1

1

You should do the following instead:

VBoxManage.exe modifyhd "%UserProfile%\VirtualBox VMs\<VM name>\<VM name>.vdi" --resize 102400
  • %UserProfile% is C:\Users\<name>
  • Replace <VM name> with the name of your virtual machine.
iTechieGamer
  • 723
  • 4
  • 11