Link to home
Start Free TrialLog in
Avatar of AttilaB
AttilaB

asked on

Unable to resize an Oracle VM Virtual Box Virtual Drive under Linux 13.04

I underestimated the necessary space needed for a an Oracle VM Virtual Box Virtual Drive under Linux 13.04.
I have Windows 7 installed as the guest I am trying to resize, and I am trying to resize from 52 Gbytes present size to 80 GB new size: 81920

So, I look at instructions at the virtual box Oracle forum:
https://forums.virtualbox.org/viewtopic.php?f=35&t=50661

Then, I try to do the same thing, and it doesn't work for a syntax issue, pasted it from Terminal:

VBoxManage modifyhd /home/attila/VirtualBox VMs/Windows 7 Online - Android --resize 81920

attila@attila-Satellite-S55D-A:~$ VBoxManage modifyhd /home/attila/VirtualBox VMs/Windows 7 Online - Android --resize 81920
Oracle VM VirtualBox Command Line Management Interface Version 4.3.8
(C) 2005-2014 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 'VMs/Windows'
attila@attila-Satellite-S55D-A:~$ 

Open in new window


Folder path to guest on virtual machine:
/home/attila/VirtualBox VMs/Windows 7 Online - Android

What am I doing wrong here to get the syntax error?
Avatar of AttilaB
AttilaB

ASKER

Ok. Just to clarify, my mis-typing:

Folder path to Windows 7 guest, on the Ubuntu host file system:
/home/attila/VirtualBox VMs/Windows 7 Online - Android

The name contains SPACES. What do I do with that?
Avatar of rindi
Put the folder with spaces between "....".
Avatar of AttilaB

ASKER

Well it doesn't do it. I tried the following:

VBoxManage modifyhd /home/attila/VirtualBox VMs/"Windows 7 Online - Android" --resize 81920

and

VBoxManage modifyhd /home/attila/"VirtualBox VMs"/"Windows 7 Online - Android" --resize 81920

This is what I am getting on the command line:
attila@attila-Satellite-S55D-A:~$ VBoxManage modifyhd /home/attila/VirtualBox VMs/"Windows 7 Online - Android" --resize 81920
Oracle VM VirtualBox Command Line Management Interface Version 4.3.8
(C) 2005-2014 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 'VMs/Windows 7 Online - Android'
attila@attila-Satellite-S55D-A:~$ 
attila@attila-Satellite-S55D-A:~$ VBoxManage modifyhd /home/attila/"VirtualBox VMs"/"Windows 7 Online - Android" --resize 81920
VBoxManage: error: The medium '/home/attila/VirtualBox VMs/Windows 7 Online - Android' can't be used as the requested device type
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), 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
attila@attila-Satellite-S55D-A:~$ ^C
attila@attila-Satellite-S55D-A:~$ ^C
attila@attila-Satellite-S55D-A:~$ 

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of rindi
rindi
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AttilaB

ASKER

I didn't think that I needed to drill down all the way to the .vdi file.

But you are right if I do the following:

attila@attila-Satellite-S55D-A:~$ VBoxManage modifyhd "/home/attila/VirtualBox VMs/Windows 7 Online - Android/Windows 7 Online - Android.vdi" --resize 81920

It seems to work as expected:
attila@attila-Satellite-S55D-A:~$ VBoxManage modifyhd "/home/attila/VirtualBox VMs/Windows 7 Online - Android/Windows 7 Online - Android.vdi" --resize 81920
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
attila@attila-Satellite-S55D-A:~$ 

Open in new window


Now, I will have to start GParted from inside the guest OS and extend the NTFS file system to 80 GB. I will post a new question if I run into any issues.

Thanks for your help.
If your VM is Windows 7, you should just be able to use it's internal diskmanagement to expand the partition.
Avatar of AttilaB

ASKER

Well, probably. I may try it later that way. However, after 'recovery' and other utilities didn't seem to work for me for Windows I have a deep well-founded distrust in Windows utilities. So I tried it like this instead:
(I always try what Microsoft makes as a last resort.)

1. I mounted GParted live as a virtual CD deive in guest:
User generated image
2. Re-sized partition after booting the virtual machine into GParted Live:
User generated image
3. Removed GParted Live mounted as a virtual CD drive, and re booted:
User generated image
That's it.
I use that method when the OS doesn't allow you to resize the partition, like Windows 2003/XP or earlier. But from 2008/Vista and newer it works very well in diskmanagement. It is also directly available, without needing a reboot. It is one of those things that work surprisingly well.