Ticket #11960 (closed defect: fixed)
vboxmanage modifyhd corrupts vhd files => fixed in SVN
Reported by: | nim | Owned by: | |
---|---|---|---|
Component: | virtual disk | Version: | VirtualBox 4.2.16 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | all |
Description
I tried to resize some of my VHD files which I formerly ran using Microsoft VPC.
vboxmanage modifyhd abc.vhd --resize 25600
The command runs without error. But I'm not able to boot into the guest OS anymore; the VHD is corrupt.
However If I convert the VHD to VDI using
vboxmanage clonehd --format VDI
and run the modifyhd command, everything works fine - I can boot into the guest OS on the VDI.
I googled and found this guy ( http://wp.sjkp.dk/tag/modifyhd/) is also having the same problem.
Change History
comment:2 Changed 10 years ago by nim
I tested with another vhd disk which has a virtual size of 32gb. The VHD is used as a data disk inside the guest OS (Windows XP).
vboxmanage modifyhd the.vhd --resize 35600
After this command, I boot into the guest OS and the disk is shown as Unknown and 'Not initialized' in Disk Management.
comment:3 Changed 10 years ago by nim
It seems modifyhd cannot shrink the VHD. If I specify a smaller size than 32gb I got:
Progress state: VBOX_E_NOT_SUPPORTED VBoxManage: error: Resize hard disk operation for this format is not implemented yet!
I'm not sure if it's by design or a bug.
comment:4 Changed 10 years ago by nim
Oh, please note - the VHD files were originally created using Microsoft Virtual PC 2007.
comment:5 Changed 10 years ago by nim
Again, I did clonehd on that VHD to VDI format and could successfully resize the VDI disk to a larger size.
Not reproducible here. Could you be a bit more specific about the guest you are using? The size of the VHD before you tried to resize it would be helpful too.