VirtualBox

Ticket #17283 (closed enhancement: fixed)

Opened 20 months ago

Last modified 7 months ago

VBoxManage throws an undescriptive error when trying to resize a VDI downwards

Reported by: r3muxd Owned by:
Component: other Version: VirtualBox 5.2.0
Keywords: command-line VBoxManage Cc:
Guest type: all Host type: all

Description

Bug: When trying to resize a VDI to a size smaller than its current size, VBoxManage throws the following error:

"Progress state: VBOX_E_NOT_SUPPORTED VBoxManage.exe: error: Resize medium operation for this format is not implemented yet!"

This error doesn't actually tell you the VDI is too big of a size for this operation. What's worse, trying to resize a fixed VDI or an actual unsupported file format throws the same error, so you have to guess.

How to reproduce:

Create a VDI

Run the command "VBoxManage modifyhd <nameofvdi> --resize <size>", where <size> is smaller than the size of the VDI and <nameofvdi> is the name of the VDI.

Fix:

Change the error message to read "Resize medium operation for this VDI is too small a size!" or something to that sort.

Change History

comment:1 follow-up: ↓ 3 Changed 8 months ago by palminha

I'm having the same problem with Windows guest 5.2.22

I'm not able to shrink the VDI file and i can't understand why.

comment:2 Changed 8 months ago by palminha

I've looked at #9103 but in my case i already deleted all the snapshot. So i'm probably falling in a different case

comment:3 in reply to: ↑ 1 Changed 8 months ago by socratis

Replying to palminha:

I'm not able to shrink the VDI file and i can't understand why.

Because if you read the description of the ticket, it is known that you cannot shrink a VDI. It's not supported. Only enlargement is supported.

comment:4 Changed 7 months ago by aolll.dev

  • Status changed from new to closed
  • Resolution set to fixed

implemented in VirtualBox 6.0 (current dev test build or later)

comment:5 Changed 7 months ago by socratis

Nice aoll.dev!!!

$ VBoxManage modifyhd /Users/Shared/VirtualBox/Machines/Test/Test.vdi --resize 200
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage: error: Failed to resize medium
VBoxManage: error: Shrinking is not yet supported for medium '/Users/Shared/VirtualBox/Machines/Test/Test.vdi'
VBoxManage: error: Details: code VBOX_E_NOT_SUPPORTED (0x80bb0009), component MediumWrap, interface IMedium
VBoxManage: error: Context: "RTEXITCODE handleModifyMedium(HandlerArg *)" at line 768 of file VBoxManageDisk.cpp

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use