Page 2 of 3

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 17:56
by omro
So I opened the hex editor and I am a little lost! I can't see the elements you say to edit.

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 17:59
by mpack
The status line (bottom left) tells you the current offset. Try moving the cursor around. I can't make it any simpler I'm afraid.

ps. I see that this disk is a CloneVDI clone. Whyever did you elect to use a VBoxManage command line to resize the disk when you had access to CloneVDI?

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 18:04
by omro
Because the Clone was done using my work's windows PC and the resize was done on my mac at home.

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 18:06
by omro
So, just to confirm

Hex 170 = 00
Hex 171 = 00
Hex 172 = 00
Hex 173 = 00
Hex 174 = 05
Hex 175 = 00
Hex 176 = 00
Hex 177 = 00

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 18:08
by mpack
Correct, but I'll warn you now: I tend to get quite tetchy when asked to restate a point I think I made quite clearly at the first attempt!

If you have the backup I warned you to make then there's no need to be this nervous: get on with it! :)

ps. CloneVDI can be used on a Mac host if you install Wine / Winebottler. Details in the CloneVDI discussion thread, no doubt you can find it in google.

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 18:27
by omro
Sadly this did not work :-(
Result Code:
VBOX_E_IPRT_ERROR (0x80BB0005)
Component:
Medium
Interface:
IMedium {53f9cc0c-e0fd-40a5-a404-a7a5272082cd}
Callee:
IVirtualBox {c28be65f-1a8f-43b4-81f1-eb60cb516e66}

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 18:40
by mpack
Hmm. The hex editor method should have been quite straightforward: I'm not sure what could have messed it up, other than failing to use the "Open Partially" feature. What you could do is open the first 10000 bytes again using "Open Partially", then "Save as" something.bin, and post the zipped bin here - that way I can check your work.

If you really can't get this fix to work then its back to one of the earlier suggestions I'm afraid.

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 18:44
by omro
Definitely partially open, the screenshot shows that.

I'll definitely give the other options a try. Thanks!

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 18:47
by Perryg
Just wondering but you said that you cloned this off your work machine. Can't you just get another clone?

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 18:50
by mpack
omro wrote:Definitely partially open, the screenshot shows that
Does it? Is that what the 'P' stands for? I've never noticed that before!

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 19:08
by omro
Perryg wrote:Just wondering but you said that you cloned this off your work machine. Can't you just get another clone?
Don't have access to this machine for a while :-(

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 19:11
by omro
OK,

So I created a new Linux Mint VM and attached the damaged VDI as a drive and when I boot into Mint, this shows up and I can access it.

When I tried dding, it fails.

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 19:14
by omro
ok, I fixed that by unmounting the drive and going via /dev/sdb1 instead

Is the img file the raw file mentioned earlier?

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 19:43
by mpack
Yes, img file, raw file, is the same thing. At least in this context. Just be aware that the trick of turning a partition image into a disk image is AFAIK unique to CloneVDI. E.g. if you try it with VBoxManage it will seem to work but the result will be garbage (boot tracks missing, and nor can you fix them because no space was allocated for them).

Re: Screwed up a VirtualBox VM resize

Posted: 16. Jan 2012, 20:24
by omro
Still waiting for the image file to be created, so will update when it's created.