[SOLVED]VBoxManage modifyhd

Discussions about using Linux guests in VirtualBox.
Post Reply
Mayagrafix
Posts: 20
Joined: 27. Mar 2013, 18:47
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: OpenSUSE

[SOLVED]VBoxManage modifyhd

Post by Mayagrafix »

Would the following be the corect sintax to resize a virtual HDD from 8G to 15G?

VBoxManage modifyhd 810963de-2a31-43b5-b2a1-9fa48dc7a970 --resize 15G

Here is the output from VBoxManage list hdds:

UUID: 810963de-2a31-43b5-b2a1-9fa48dc7a970
Parent UUID: base
Format: VDI
Location: /home/mayagrafix/VirtualBox VMs/openSUSE/openSUSE-HDD.vdi
State: created
Type: normal
Usage: openSUSE (UUID: f82cf1be-ce41-425f-b00e-3a14b6cea2be)


Thanks for any help 8)
Last edited by Mayagrafix on 16. May 2013, 22:04, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: VBoxManage modifyhd

Post by mpack »

"15G" is not a number. You need to provide a number in MB. Hopefully you didn't resize the drive to 15MB (thankfully that should not be possible - however you mentioned no error message).
Mayagrafix
Posts: 20
Joined: 27. Mar 2013, 18:47
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: OpenSUSE

Re: VBoxManage modifyhd

Post by Mayagrafix »

Thanks for the heads-up, better shure than sorry. OK, here is what I get:

mayagrafix@Inspiron-620ss:~$ VBoxManage modifyhd 810963de-2a31-43b5-b2a1-9fa48dc7a970 --resize 15360

VBoxManage: error: The given path '810963de-2a31-43b5-b2a1-9fa48dc7a970' is not fully qualified
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 178 of file VBoxManageDisk.cpp
Mayagrafix
Posts: 20
Joined: 27. Mar 2013, 18:47
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: OpenSUSE

Re: VBoxManage modifyhd

Post by Mayagrafix »

Here is one that worked:

VBoxManage modifyhd /home/mayagrafix/VirtualBox_VMs/openSUSE/openSUSE-HDD.vdi --resize 15360

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Thanks for all your help :D
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: [SOLVED]VBoxManage modifyhd

Post by mpack »

If you had put the UUID {in braces} then that would probably have worked too. To be safe, I would wrap both filenames and UUIDs "in quotes" too.
L30nardoSV
Posts: 1
Joined: 1. Aug 2013, 23:24

Re: [SOLVED]VBoxManage modifyhd

Post by L30nardoSV »

I confirm what Mayagraphics said.

It works fine. Just in case the path of your .vdi file has spaces, don't forget to put "\" in order to specify it.

Code: Select all

root@l30nardosv:/home/l30nardosv/VirtualBox VMs/CentOS6.4# VBoxManage showhdinfo CentOS6.4.vdi 
UUID:                 322a76c7-4349-4c5a-b9eb-8ed95582b24a
Accessible:           yes
Logical size:         8192 MBytes
Current size on disk: 7680 MBytes
Type:                 normal (base)
Storage format:       VDI
Format variant:       dynamic default
Location:             /home/l30nardosv/VirtualBox VMs/CentOS6.4/CentOS6.4.vdi
The location ".../VirtualBox VMs/..." specified above has a space character, so the command would be (check out the "\" inserted!):

Code: Select all

root@l30nardosv:/home/l30nardosv/VirtualBox VMs/CentOS6.4# VBoxManage modifyhd /home/l30nardosv/VirtualBox\ VMs/CentOS6.4/CentOS6.4.vdi --resize 15360
The results is:

Code: Select all

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: [SOLVED]VBoxManage modifyhd

Post by mpack »

AFAIK, you just wrap the argument in quotes "like this". Any other trick may not work on all hosts.
Post Reply