SOLVED: Failed to resize medium

Discussions about using Linux guests in VirtualBox.
Post Reply
Joachim Schrader
Posts: 2
Joined: 12. Dec 2008, 11:01

SOLVED: Failed to resize medium

Post by Joachim Schrader »

I'm running Ubuntu guest on a Windows 10 host, and I'm running out of disk on the guest.

I had 10 GB, and with Virtual Media Manager I expanded it to 20 GB (20.43 GB). Then I run this command:

Code: Select all

VBoxManage.exe modifymedium disk "D:\VirtualBoxVM\ubuntu\ubuntu.vdi" --resize 20430
and I get this error:
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Failed to resize medium
VBoxManage.exe: error: Shrinking is not yet supported for medium 'D:\VirtualBoxVM\ubuntu\ubuntu.vdi'
VBoxManage.exe: error: Details: code VBOX_E_NOT_SUPPORTED (0x80bb0009), component MediumWrap, interface IMedium
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleModifyMedium(struct HandlerArg *)" at line 816 of file VBoxManageDisk.cpp
This is my vdi:

Code: Select all

UUID:           f4ebb23d-14a9-486d-a9d2-f289661a4b2d
Parent UUID:    base
State:          created
Type:           normal (base)
Location:       D:\VirtualBoxVM\ubuntu\ubuntu.vdi
Storage format: VDI
Format variant: dynamic default
Capacity:       20921 MBytes
Size on disk:   9599 MBytes
Encryption:     disabled
Property:       AllocationBlockSize=1048576
In use by VMs:  ubuntu (UUID: 2a289866-dffe-4bca-8bb9-b1df43ac8478)
EDIT: Found out that I had to resize the partition too, so I loaded the GParted iso-file and resized the partition Ubuntu uses - then the resize operation was done, and Ubuntu runs happily with 10 more gigabytes :) I also found out that I don't have to use the command line tool, and that I already had resized the allocated disk - I just had to partition the disk...
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: SOLVED: Failed to resize medium

Post by mpack »

Hmm. Welcome back, and that's a long time between posts!

Obviously the original error you reported is because the disk capacity was already at or above the value you requested. I assume you did the resize, tried it and found that the partition was no bigger, tried the command line again and got the error.
Post Reply