failed to undo a bad resize over vdi image
Posted: 31. Oct 2016, 14:48
Hi,
by mistake I resized a vdi using --resize <sizeinbytes>
but if I try to resize it back to a sane value it even fails to read it.
Any idea how can I correct it?
Thanks in advance.
by mistake I resized a vdi using --resize <sizeinbytes>
Code: Select all
$ ls -l Windows\ 7-disk1.vdi
-rw------- 1 amery amery 68605181952 Oct 31 10:39 Windows 7-disk1.vdi
$ file Windows\ 7-disk1.vdi
Windows 7-disk1.vdi: VirtualBox Disk Image, major 1, minor 1 (<<< Oracle VM VirtualBox Disk Image >>>), 81064793292668928 bytes
Code: Select all
$ VBoxManage modifyhd $PWD/Windows\ 7-disk1.vdi --resize 72000 --compact
VBoxManage: error: Could not get the storage format of the medium '/home/.../Windows 7-disk1.vdi' (VERR_NOT_SUPPORTED)
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component MediumWrap, interface IMedium, callee nsISupports
VBoxManage: error: Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())" at line 179 of file VBoxManageDisk.cpp
Thanks in advance.