Page 1 of 1

clonehd / clonevdi problem

Posted: 19. Dec 2008, 11:57
by Thalic
I am trying to clone a disk image (VDI format) of a Windows XP SP2 guest. The cloning commands (clonehd and clonevdi) worked without reporting any errors, but the resulting VDI file is smaller than the original (about 1.4GB vs 1.5GB) and fails to boot with "A disk read error occurred" "Press Ctrl+Alt+Del to restart".
The settings of the different VMs are the same. I even tested the copied image in the original VM, with the same result.

Am I doing something wrong or could this be a bug?

VirtualBox Version 2.1.0
Host: Windows XP SP3
Guest: Windows XP SP2 (right after installation, no updates installed)
Original VDI image created on VirtualBox 2.1.0

Posted: 19. Dec 2008, 12:21
by Thalic
Ran some more tests.

If i clone the image into a VMDK format container it seems to work.

After adding some data to the original VM (by booting it, image is now about 1.6GB) and cloning it to a VDI again, I get a different error message:

Code: Select all

Windows could not start because the following file is missing
or corrupt:
<Windows root>\system32\hal.dll
Please re-install a copy of the above file.

Posted: 19. Dec 2008, 12:21
by drbadvibes
I'm expiriencing the same problem. Wich version are you using? I am using version 2.1.0. And did you noticed that the cloned vdi is smaller in size?

My original vdi = 3.507.569.152 and the cloned one 3.459.334.656.

Maybe it has something to do with that...

Posted: 19. Dec 2008, 12:26
by Thalic
Yes, I'm using V2.1.0 and the cloned VDI Image is smaller.

Posted: 19. Dec 2008, 13:05
by drbadvibes
I downgraded to 2.0.6 and retried the cloning. Now it worked.
The VDI size is now exactly the same as the original. So it seems to be bug related

Posted: 19. Dec 2008, 14:35
by Thalic
Ok, I'll open a bug report then.

edit:
bug report: http://www.virtualbox.org/ticket/2813

Posted: 19. Dec 2008, 15:56
by mpack
I've not looked at the source code yet, but I get the feeling that disk cloning is now much more complicated than it was in previous versions.

Previously you could only clone VDI files, the cloning function was basically a simple image copy plus a modification of the UUID in the header.

Now you can clone VDI, VMDK and VHD files, and furthermore the "clone" doesn't have to be in the same format as the source - you can use "cloning" to convert between (say) VDI and VMDK.

I would guess, given what you say, that VDI->VDI clones now go through the same "conversion copy" function even though the source and dest formats are the same.

If you doubt that VDI cloning works reliably in VBox 2.1.0 then a possible alternative (untried by me with that VBox version) is to copy the VDI file with your host OS, then use "vboxmanage internalcommands setvdiuuid <filename>" to correct the UUID.

Posting an official bug report is good too.

Posted: 20. Dec 2008, 12:45
by guardian_de
I have the same problem with 2.1.0 on Linux (host and guest).

But I can report that mpack's suggestion (copying natively and running "VBoxManage internalcommands sethduuid file.vdi") works.