--resize crashes VHD disk

Discussions related to using VirtualBox on Windows hosts.
Post Reply
beremour
Posts: 4
Joined: 12. Jan 2011, 07:32
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows XP

--resize crashes VHD disk

Post by beremour »

C:\var\ftp\vmdisk>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" showhdinfo DHDD01.vhd
UUID:                 f122cf56-de5a-43f2-bd86-bc7ad8934dee
Accessible:           yes
Logical size:         1024 MBytes
Current size on disk: 0 MBytes
Type:                 normal (base)
Storage format:       VHD
Format variant:       dynamic default
Location:             C:\var\ftp\vmdisk\DHDD01.vhd
C:\var\ftp\vmdisk>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd DHDD01.vhd --resize 2048
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
and now VHD-disk is crashed
C:\var\ftp\vmdisk>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" showhdinfo DHDD01.vhd
VBoxManage.exe: error: Could not get the storage format of the medium 'C:\var\ftp\vmdisk\DHDD01.vhd' (VERR_NOT
_SUPPORTED)
VBoxManage.exe: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component Medium, interface IMedium, call
ee IUnknown
Context: "OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, AccessMode_ReadWrite, fForceNewUuidOnOpen, pMe
dium.asOutParam())" at line 210 of file VBoxManageDisk.cpp
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 crashes VHD disk

Post by mpack »

If the original size on disk of the VHD was 0MB then I'm not surprised you get a crash when you try to manipulate it. I'd want to take a closer look at whatever you have there.
beremour
Posts: 4
Joined: 12. Jan 2011, 07:32
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows XP

Re: --resize crashes VHD disk

Post by beremour »

hm.. when filled it seems to be OK
C:\var\ftp\vmdisk>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" showhdinfo DHDD01.vhd
UUID:                 ec0c6712-a533-48da-beff-75cf5390a216
Accessible:           yes
Logical size:         1024 MBytes
Current size on disk: 612 MBytes
Type:                 normal (base)
Storage format:       VHD
Format variant:       dynamic default
Location:             C:\var\ftp\vmdisk\DHDD01.vhd

C:\var\ftp\vmdisk>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd DHDD01.vhd --resize 2048
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

C:\var\ftp\vmdisk>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" showhdinfo DHDD01.vhd
UUID:                 ec0c6712-a533-48da-beff-75cf5390a216
Accessible:           yes
Logical size:         2048 MBytes
Current size on disk: 614 MBytes
Type:                 normal (base)
Storage format:       VHD
Format variant:       dynamic default
Location:             C:\var\ftp\vmdisk\DHDD01.vhd
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 crashes VHD disk

Post by mpack »

It's a bug, but a trivial one - I don't know who would actually fall foul of this in real life (people generally resize when their existing disk is full, not when it's empty). Still, you could raise a BugTracker ticket for it.

* BugTracker is a separate system, although you can use the same OSSO login you use here. On first login you'll be asked to choose a nickname for that site. It would make sense to use the same nickname as here.
Post Reply