VirtualBox

Ticket #15983 (closed defect: fixed)

Opened 10 months ago

Last modified 8 months ago

VDI image resize yields unbootable VDI

Reported by: markusvm Owned by:
Priority: major Component: virtual disk
Version: VirtualBox 5.1.6 Keywords:
Cc: Guest type: Windows
Host type: Linux

Description

Using

VBoxManage modifymedium disk <file> --resize <size>

in VirtualBox 5.1.6 r110634 turns the VDI image (no snapshots used) into an unbootable medium, i.e., the MBR is garbage.

In my specific case, the capacity of the image before resize is 64000 MBytes (61599 MBytes size on disk). I tried 68000 MBytes and 72000 MBytes as resize goal. Both operations complete almost instantly without error and

VBoxManage showhdinfo <file>

outputs the correct capacity and unchanged size of disk.

I used resize before with other VirtualBox versions on this image and it was never a problem.

Attachments

header.vdi Download (254.0 KB) - added by markusvm 10 months ago.
Header of VDI image before resize
diff.txt Download (2.0 KB) - added by markusvm 10 months ago.
Diff of hexdump of the first 3145728 bytes of VDI image before and after resize
header.tar.bz2 Download (82.7 KB) - added by markusvm 9 months ago.
Header of VDI image before and after resize and hex diff
header.zip Download (185.5 KB) - added by markusvm 9 months ago.
Content of header.tar.bz2 as zip archive

Change History

comment:1 Changed 10 months ago by markusvm

Could somebody please comment on the bug? Thank you.

comment:2 Changed 10 months ago by aeichner

I couldn't reproduce this so far so it must be dependent on the order the blocks are stored in the image. Can you please extract the first 3145728 bytes of the image before the resize (assuming you still have an unmodified backup) and attach it to the ticket?

Changed 10 months ago by markusvm

Header of VDI image before resize

Changed 10 months ago by markusvm

Diff of hexdump of the first 3145728 bytes of VDI image before and after resize

comment:3 Changed 10 months ago by markusvm

I added the VDI image header as well as a hexdump diff of the first 3145728 bytes of the original VDI image vs the resized VDI image. Can you see the problem?

comment:4 Changed 10 months ago by markusvm

Is there any progress on the bug?

comment:5 Changed 10 months ago by aeichner

The header you attached is too short and doesn't contain the full block allocation table, please attach the first 3145728 bytes of the image completely like I asked for previously.

comment:6 Changed 9 months ago by markusvm

I performed a resize with VirtualBox version 5.0.24 r108355 (Ubuntu 16.04.1) and it worked. Hence, there must be a regression in between version 5.0.24 r108355 and version 5.1.6 r110634. I also compiled VirtualBox from the sources (trunk). The bug was also present there.

Note that I cannot send the first 3145728 bytes since they contain actual data. From my understanding of the VDI file format, the data I submitted should be enough to understand the problem. It would be great if you could find the regression.

comment:7 Changed 9 months ago by aeichner

The data you sent is not complete as it chops off a part of the block table which is used to map the logical block number to offsets in the image file. I need the complete table to create an image with which I can hopefully replicate your issue. Your header indicates that real data in the image starts at offset 1048576 which is 1MB into the image, so please attach at least the first 1MB of the image which does not contain any data from the guest.

Changed 9 months ago by markusvm

Header of VDI image before and after resize and hex diff

comment:8 Changed 9 months ago by markusvm

I added the image header before and after resize including hex diff.

Changed 9 months ago by markusvm

Content of header.tar.bz2 as zip archive

comment:9 Changed 9 months ago by aeichner

Thanks for the updated header! I was finally able to find the bug and did a fix, please try the latest 5.1 build from our Testbuilds page.

comment:10 Changed 8 months ago by markusvm

It took a while until i could try it out but I am happy to confirm that the fix solved the problem for me. Thank you.

comment:11 Changed 8 months ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part of VBox 5.1.10.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use