Page 1 of 1

Resize Error Mac 10.6.8

Posted: 5. May 2012, 23:06
by dailygrooming
Hi can anyone help please:

Mac running 10.6.8
Vbox 4.1.14 r77440

I'm trying to resize hard drive. It has been a while since I set this up, and in the attribute details I don't have anything showing under 'details' when I'm looking for 'dynamically allocated storage' but I'm sure that this was the case when set up. The vdi is called Windows XP.vdi (with a space between windows and xp). I'm getting the following error message:

Using an underscore between Windows_XP.vdi


David-Halletts-iMac:~ davidhallett$ Library/VirtualBox/HardDisks/
-bash: Library/VirtualBox/HardDisks/: is a directory
David-Halletts-iMac:~ davidhallett$ VBoxManage modifyhd Windows_XP.vdi --resize 18000
VBoxManage: error: Could not find file for the medium '/Users/davidhallett/Windows_XP.vdi' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium, callee nsISupports
Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, AccessMode_ReadWrite, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 210 of file VBoxManageDisk.cpp
David-Halletts-iMac:~ davidhallett$

Using a space instead of an underscore

David-Halletts-iMac:~ davidhallett$ VBoxManage modifyhd Windows XP.vdi --resize 18000
Oracle VM VirtualBox Command Line Management Interface Version 4.1.14
(C) 2005-2012 Oracle Corporation
All rights reserved.

Usage:

VBoxManage createhd --filename <filename>
--size <megabytes>|--sizebyte <bytes>
[--format VDI|VMDK|VHD] (default: VDI)
[--variant Standard,Fixed,Split2G,Stream,ESX]


Syntax error: Invalid parameter 'XP.vdi'
David-Halletts-iMac:~ davidhallett$

Thanks!

Re: Resize Error Mac 10.6.8

Posted: 5. May 2012, 23:34
by Perryg
Use quotes instead "Windows XP.vdi"

Don't forget that you will need to run Gparted on the guest to extend the primary partition to use the new space.

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 02:47
by ChipMcK
Instead of Gparted for expanding the partition on the virtual disk, try one of these Windows programs for Windows XP:
http://www.paragon-software.com/home/pm-express/
http://www.partition-tool.com/
http://www.partitionwizard.com/free-par ... nager.html
Price, as with mileage, varies
Best

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 10:26
by dailygrooming
Ok, I'm in gparted. But It doesn't look good as I don't see any way of extending the partition beyond what it is 10gb (see attached screenshot). Is there a workaround?

Thanks

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 11:37
by ChipMcK
Perryg wrote: extend the primary partition to use the new space.
Use Gparted after you have increased the size of the virtual disk via the command line or the CloneVDI program

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 11:45
by mpack
If he did use CloneVDI to enlarge an XP disk then GParted shouldn't be needed. CloneVDI has an option to do the partition enlargement at the same time as the disk enlargement, all in the same step. However CloneVDI is a Windows app - it needs Wine/Winebootler if you want to run it on a Mac OS X host.

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 14:11
by dailygrooming
I can't increase the size on the command line because of the previously mentioned error. Using the quotes around the 'vdi file name' gives me:


David-Halletts-iMac:~ davidhallett$ Library/VirtualBox/HardDisks/
-bash: Library/VirtualBox/HardDisks/: is a directory
David-Halletts-iMac:~ davidhallett$ VBoxManage modifyhd "Windows XP.vdi" --resize 18000
VBoxManage: error: Could not find file for the medium '/Users/davidhallett/Windows XP.vdi' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Medium, interface IMedium, callee nsISupports
Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, AccessMode_ReadWrite, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 210 of file VBoxManageDisk.cpp
David-Halletts-iMac:~ davidhallett$

Does anyone know what the error means? If that can be solved, maybe the commend line option would work without having to install anything else?

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 14:34
by Perryg
Use the absolute path. Since you have a space in the name you must put quotes around the statement.
You will see a % completed on the screen and a success or fail indicated. If it fails Gparted will not be needed as there has been no change to the file.
Alternatively you can use CloneVDI Tool to do this for you but it must be run in wine since it is a Windows program.

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 16:48
by dailygrooming
Update:

Disk Cloned using:

David-Halletts-iMac:HardDisks davidhallett$ VBoxManage clonehd "Windows XP.vdi" Windows_XP_New.vdi

Command for freeing up hard disc space:

David-Halletts-iMac:~ davidhallett$ cd Library
David-Halletts-iMac:Library davidhallett$ cd VirtualBox
David-Halletts-iMac:VirtualBox davidhallett$ cd HardDisks
David-Halletts-iMac:HardDisks davidhallett$ VBoxManage modifyhd "Windows XP.vdi" --resize 18000
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
David-Halletts-iMac:HardDisks davidhallett$

I checked the HD in windows in the Vm and it said 10gb was all that was left to have. So I thought 'no change' BUT the VM interface reports the magic 18gb, so I'm assuming it will expand dynamically to that?

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 17:06
by Perryg
Now put the Gparted iso in the guests virtual CD and boot to that.

See if you now have an unallocated partition. If so expand the primary to include the new partition.

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 17:47
by dailygrooming
I do but it looks too small. There is only an option to add a new partition.

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 17:51
by Perryg
Do you have snapshots?
If so this is not going to work.

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 17:55
by dailygrooming
I have snapshots. Can I delete them? Could I start a new machine from the clone but with a larger hd allocation?

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 18:04
by Perryg
Strange as it may sound, you would probably be better off using CloneVDI Tool to clone the newest snapshot which will create a clone of everything and in one file (no snapshots). You must run this in Wine as it is a windows program. The reason that I say you would be better off is this will not effect the guest in any way. Read the instructions and follow them and you should have a single file (HDD) that you can use. Yo can also enlarge the HDD at the same time and more than likely it will also fill the partition table to use the new partition.

Re: Resize Error Mac 10.6.8

Posted: 6. May 2012, 19:22
by dailygrooming
Thanks for the advice. It may be better long term if I start again with windows 7 in the future. I only use XP for 2 programs and I can save data onto the host drive through a shared folder.

Hope this has helped someone.

Many thanks for everyone who contributed :)