Page 1 of 1

[Help] Cannot boot after resizing VHD

Posted: 20. Feb 2011, 14:56
by cyvbox
I used Disk2VHD to convert the xp system in my old machine to a vhd file.
I used the vhd file successfully in virtualbox.
After upgrading to 4.x, virtualbox has been added a new feature which can resize
the vhd file, i.e. Vboxmanage.exe modifyhd --resize.
I used it to resize my vhd file from 40G to 60G.
The modifyhd command completed instantly. In the media mananger, I can see
the new size of the vhd file.
But, after that, I cannot boot the vhd file anymore.

The error message is:

Fatal could not read the boot medium! System Halted!

The version of virtualbox I'm using is 4.0.4. The host system is win7.

Update1:
I also attached the resized vhd to another XP VM to try to access the files in it but failed.
The XP couldn't recognize the file system in the vhd only considered it an uninitialized disk.

Any suggestions?

Thanks very much.

Re: [Help] Cannot boot after resizing VHD

Posted: 22. Feb 2011, 12:01
by mpack
Did the VHD work in VirtualBox before you resized it? Or did you resize it before you tested it for the first time?

Re: [Help] Cannot boot after resizing VHD

Posted: 23. Feb 2011, 00:42
by mTi3Ad9vN
I have seen the same problem with v4.04 (haven't tried this with other versions): a working bootable VHD-format disk can't be booted after using

Code: Select all

vboxmanage modifyhd <disk> --resize nnnnn 
failing with an error finding the primary bootstrap (e.g., NTLDR for Windows XP disks).

The same sequence works fine with VDI-format disks.

Re: [Help] Cannot boot after resizing VHD

Posted: 23. Feb 2011, 03:26
by cyvbox
mpack wrote:Did the VHD work in VirtualBox before you resized it? Or did you resize it before you tested it for the first time?
It worked before the resize.

Re: [Help] Cannot boot after resizing VHD

Posted: 23. Feb 2011, 12:29
by mpack
You might like to try resizing the VHD using CloneVDI instead (see sticky in the "Windows Hosts" forum). Warning: in addition to enlarging the drive, CloneVDI will convert it to VDI - but that's a good move anyway IMHO, as VHD is not well designed for reliability or performance.

Re: [Help] Cannot boot after resizing VHD

Posted: 24. Feb 2011, 14:58
by cyvbox
mpack wrote:You might like to try resizing the VHD using CloneVDI instead (see sticky in the "Windows Hosts" forum). Warning: in addition to enlarging the drive, CloneVDI will convert it to VDI - but that's a good move anyway IMHO, as VHD is not well designed for reliability or performance.
I first converted it to vdi and then resized the vdi. It works now.