Resize .vdi

Discussions related to using VirtualBox on Windows hosts.
Post Reply
fry2012
Posts: 9
Joined: 9. Apr 2013, 18:12

Resize .vdi

Post by fry2012 »

Hello

I have reached my allocated vm size and am looking to resize the allocation. I have tried everything, and I really desperate for a solution

I have tried resizing the .vdi using command line and clonehd (see below). Although both appeared to work, when I go to disc management in Windows2008 r2, I dont see the extra room expand the volume ? :(

C:\Program Files\Oracle\VirtualBox>VBoxManage modifyhd "C:\Users\Frank\VirtualBo
x VMs\Windows Server 2008 (64 Bit)\CloneWindows2008.vdi" --resize 86800000
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%


C:\Program Files\Oracle\VirtualBox>VBoxManage clonehd "C:\Users\Frank\VirtualBox
VMs\Windows Server 2008 (64 Bit)\CloneWindows2008.vdi" "C:\Users\Frank\VirtualB
ox VMs\Cognos_10.2_SQL_SERVER_2008\Cognos_10.2_SQL_SERVER_2008.vdi" --existing
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: Resize .vdi

Post by mpack »

86800000MB is a rather large disk!

Perhaps you should read PerryG's guide.
fry2012
Posts: 9
Joined: 9. Apr 2013, 18:12

Re: Resize .vdi

Post by fry2012 »

Thanks for the link, this is helpful. You are correct my file size is too big.

In reading this article, I noticed that I do have a snapshot, is there any way I can get rid of it so I dont have a snapshot anymore, then I can rerun the resize
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: Resize .vdi

Post by mpack »

The easiest way to get rid of the snapshot is to clone the VM: right click on VM, select Clone, choose options: full clone, keep the old MAC address, current state only.

Your new VM will have no snapshots and should be easily resized. I suggest that you keep things simple by avoiding snapshots in future. I also suggest that you will find CloneVDI an easier (and safer) disk resizing tool.
alfgaar
Posts: 1
Joined: 5. Dec 2013, 18:03

Re: Resize .vdi

Post by alfgaar »

That's what i get upon an attempt to resize a vdi file using VirtualBox 4.3.4r91027 with the specified command VBoxManage modifyhd :
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Resize hard disk operation for this format is not impleme
nted yet!
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: Resize .vdi

Post by mpack »

That doesn't provide enough information to enable any useful comment. Anyway I suggest you read Perry's tutorial linked to above.
Derragen
Posts: 12
Joined: 30. Mar 2014, 19:43

Re: Resize .vdi

Post by Derragen »

Hello!
I tried to resize the windows xp's .vdi file with VBoxManage modifyhd WindowsXP.vdi --resize 30720 command and i got this error:
VBoxManage: error: Cannot register the hard disk '~/VirtualBoxVMs/Windows8/Windows8.vdi' {643ed081-4aa3-4926-ba3e-6ff0a9aafb53} because a hard disk '~/VirtualBox VMs/Windows 8/Windows XP.vdi' with UUID {643ed081-4aa3-4926-ba3e-6ff0a9aafb53} already exists
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component VirtualBox, interface IVirtualBox, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 178 of file VBoxManageDisk.cpp
I also read the link above, but the errormessage is the same as above. I need to resize my windows XP's hard drive to 30GiB to upgrade XP to 8 than 8.1 without windows 8' disk. Here is the post viewtopic.php?f=2&t=60959&p=283923#p283923.
Can somebody help me?
Post Reply