Could not create the clone medium (VERR_OUT_OF_RANGE)

Discussions related to using VirtualBox on Linux hosts.
Post Reply
braathwaate
Posts: 2
Joined: 24. Dec 2025, 15:11

Could not create the clone medium (VERR_OUT_OF_RANGE)

Post by braathwaate »

Any guesses on how to fix the following error?

VBoxManage clonemedium "foo.vmdk" "bar.vdi" --format vdi
0%...10%...20%...30%...40%...VBOX_E_FILE_ERROR
VBoxManage: error: Failed to clone medium
VBoxManage: error: Could not create the clone medium 'bar.vdi' (VERR_OUT_OF_RANGE)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium
VBoxManage: error: Context: "RTEXITCODE handleCloneMedium(HandlerArg*)" at line 1208 of file VBoxManageDisk.cpp

foo.vmdk is a Windows 8 virtual disk that I use with virtual box with no problems. The goal is to make a copy of it to try to extend the space on it because the resize on the vmdk disk didn't work (virtual box resizes it OK, but windows does not show any unallocated space).
braathwaate
Posts: 2
Joined: 24. Dec 2025, 15:11

Re: Could not create the clone medium (VERR_OUT_OF_RANGE)

Post by braathwaate »

I made some progress on this so I consider it solved.

The problem virtual disk was a vmdk file with extents, which might have been part of the problem.

First, I was able to use the virtual disk GUI to clone it.

Next, I was able to merge it into a single vmdk using vmware-vdiskmanager.

Next, then I was able to VBoxMange clonemedium successfully in vdi format.

Ultimately, that allowed me to extend the disk partition, which was my original goal.
aloofgantr
Posts: 1
Joined: 21. Jan 2026, 09:39
Primary OS: MS Windows Vista
VBox Version: OSE Mandriva
Guest OSses: VirtualBox
Location: https://polytrack-game.io

Re: Could not create the clone medium (VERR_OUT_OF_RANGE)

Post by aloofgantr »

VERR_OUT_OF_RANGE usually happens with VMDKs that have snapshots or a non-standard layout. VBoxManage clonemedium can’t always handle these.

Try one of these:

Make sure the disk is detached and has no snapshots

Use convert instead of clone:

VBoxManage clonehd foo.vmdk bar.vdi --format VDI


If that fails, convert with qemu-img first:

qemu-img convert -f vmdk foo.vmdk -O vdi bar.vdi


After conversion, resize the VDI and extend the partition inside Windows.
Post Reply