Page 1 of 2

Using Vista's backup image as VM

Posted: 13. Nov 2009, 21:31
by Alon
Hi,

As far as I know the Vista's backup image (vhd) is a normal virtual HD that can be used in Microsoft VPC 2007.

I tried to load it in VBox but getting the error "int18: boot failure".

The vhd size is more than 4GB and the drive inside is around 160GB (MS VPC supports only up to 120 adn something GB drives...).

any idea what is going on?

Thanks,

Alon

Re: Using Vista's backup image as VM

Posted: 14. Nov 2009, 02:08
by MarkCranness
There is a very recent post with "INT18: BOOT FAILURE" in the subject line.
Please use search to find that post.

Re: Using Vista's backup image as VM

Posted: 15. Nov 2009, 00:28
by BillG
Yes, the file is in .vhd format, but it is not bootable. It is not supposed to. It doesn't boot under VPC either.

Re: Using Vista's backup image as VM

Posted: 15. Nov 2009, 05:47
by Alon
thanks Billg. Is there a way to make it bootable?

Re: Using Vista's backup image as VM

Posted: 18. Nov 2009, 04:11
by Etepetete
Alon wrote:... Is there a way to make it bootable?
I discussed this topic with mpack, the creator of the CloneVDI tool and there is a way to make your VHD bootable. Hope this helps.

Re: Using Vista's backup image as VM

Posted: 18. Nov 2009, 04:57
by Alon
Thanks Etepetete, i'm running the CloneVDI as we speak but as it's goanna take ~3.5 hours, I have a question - you wrote that in the Partition info it showed you the partition as bootable (even that it was not?!). Mine showed as non-bootable (which according to posts above it really is non-bootable). mpack in his answer say that the CloneVDI will make it bootable - do you have an idea if it will work?

Alon

Re: Using Vista's backup image as VM

Posted: 18. Nov 2009, 12:58
by Etepetete
Alon, what mpack said, is that the VHD in reality contains a boot sector. The problem lies therein that it is not marked as bootable in the partition. The solution would be to change that using a hex editor or to use a partitioning tool (e.g. gparted).
mpack wrote:...the large VHD does appear to be a complete disk image which already includes a valid if unusual MBR (eg. unusual in that the first sector of first partition seems to be at LBA 128 instead of the more usual 63). The only problem is that none of the partitions in the table are marked as bootable. This could easily be corrected with a hex editor, or better yet with a partitioning tool running inside a VM (obviously the VHD would have to be mounted as a second drive first).
He also stated that ConeVDI would not be the tool of choice to fix this:
mpack wrote:I'm not sure that CloneVDI is the best tool for specialized manipulations like that.
Alon wrote:...you wrote that in the Partition info it showed you the partition as bootable...
I was testing the conversion of a raw partition image (in contrast to a raw disk image) and not a VHD.

Re: Using Vista's backup image as VM

Posted: 18. Nov 2009, 13:01
by MarkCranness
MarkCranness wrote:There is a very recent post with "INT18: BOOT FAILURE" in the subject line.
Please use search to find that post.
/me grits teeth... breath in, breath out... :|

VirtualBox Forums - Error Code: FATAL: INT18: BOOT FAILURE

Re: Using Vista's backup image as VM

Posted: 18. Nov 2009, 13:20
by mpack
Apart from getting a similar error message, I'm not sure the same feature is being discussed in that other thread. E.g.
MarkCranness wrote:Technical: I would guess that the vdisk VHD that diskpart created did not have a bootable MBR in it (it has a MBR with a partition table, but does not have any runnable boot code.
In this thread the discussion has been about VHDs created by the Vista/Win7 "Backup" feature (not diskpart). In the Win7 case I know that the resulting MBR does contain boot code, though whether that code is "runnable" will need further investigation (though I don't know why the code is there if it isn't!). The MBR also contains a partition table, but none of the partitions are marked as bootable. That seems to be the only problem.

Re: Using Vista's backup image as VM

Posted: 18. Nov 2009, 14:31
by MarkCranness
mpack wrote:In this thread the discussion has been about VHDs created by the Vista/Win7 "Backup" feature (not diskpart).
True, but it might not matter how they were created, and bootsect.exe might be a possible fix in either or both situations.

Re: Using Vista's backup image as VM

Posted: 19. Nov 2009, 03:08
by Alon
Hi MarkCranness,

I tried the bootsect but it looks like is for fixing, not creating.

I think I need a tool that will CREATE the boot in the VHD.

BTW, the CloneVDI didn't do it, it just cloned it to VDI (as was supposed to...) without any new boot sector.

Thanks,

Alon

Re: Using Vista's backup image as VM

Posted: 19. Nov 2009, 03:48
by Etepetete
Alon wrote:BTW, the CloneVDI didn't do it, it just cloned it to VDI (as was supposed to...) without any new boot sector.
Alon, nobody said that CloneVDI would fix the boot sector of a VHD! :x But that aside, you have already tried Mark's suggestion without success. You should try doing what mpack said. If that doesn't work, then here is something that MIGHT help but without guaranty.

Download SystemRescue image (ISO). Mount this image as your virtual CD/DVD rom of the VM to which your VHD file is attached to. Make sure the boot order of your VM is set up to boot from this CD/DVD image. Go here and read how to use the tool TestDisk. AFTER YOU ARE SURE YOU KNOW HOW TO USE IT, boot up your VM. If everything is setup properly, SystemRescue should load. Within SystemRescue start TestDisk and let it analyze the VHD and then let it fix it.

I have never used SystemRescue to write a boot record to a VHD, but I have used it successfully to repair physical machines. If this doesn't work, the only other solution I can think of is to make a VM of the physical installation.

Good luck!

Re: Using Vista's backup image as VM

Posted: 19. Nov 2009, 04:26
by Alon
Thanks. Actually, I'm doing something much simpler - I'm installing the Vista from the reinstallation disk to a VM and afterwards I will just restore the backup to that VM. End of story. A bit of work (time) but should not fail...

Thanks again to all who tried to help.

I do think that the real solution would be a tool that can adjust the backup VHD file to have a boot sector (if is even possible as is a backup file, not real VM file).

Alon

Re: Using Vista's backup image as VM

Posted: 19. Nov 2009, 09:32
by Etepetete
Alon, be careful with what you intend to do. As I understand it, your backup image was made on a machine different than the new VM you are setting up. This means the two are based on two separate hardware profiles. I would suggest reading the user manual, the part about configuring DMI data, and configure your VM to reflect the properties of your physical machine as much as possible. Configure the DMI data before you make the initial install to the VM.

I would also be interested in if you succeeded, so please post the results of your endeavor.

Re: Using Vista's backup image as VM

Posted: 19. Nov 2009, 17:02
by Alon
Thanks Etepetete for the warning.

I will try it in the next few days and post the results...