convert virtualbox .vdi to physical & bootable second disk

Ive been running VirtualBox with a windows XP installation for some time, on an opensuse 11.0 host for some time.
Recently, however ive been having issues with suse, and want to take my virtual XP and make it a primary bootable physical partition, on a second disk

I know it can be done, but im not finding how exactly.

What ive tried so far.
I’ve taken VBoxManage terminal tool and converted the VDI to a .img file, and tried to move that to my second physical disk, but it didnt work at all.

After some thinking, I booted to acronis true image within my virtual machine, and cloned the C:/ drive of windows over to my second hard drive.
That got me further, but doesn’t boot fully.
Comes up to windows xp logo, and black screen boot loops.

Ive heard about using vditool to create a .raw file, and then go from there, but im at a loss to find vdi tool

How can i move my virtual machine to a physical, bootable partition on a second drive?

Are you sure that it is possible?
Just to clear out:
VirtualBox is a virtual computer together with his own virtual hardware - so it’s absolutely possible that your pc won’t boot up - unless your hardware is matching with VirtualBox’s virtual hardware.

I’ve heard of it being done on various IRC networks before, but was not interested at the time.
The virtualized hardware matches the physical hardware.
Since im trying to use the same box, I can’t see any reason for it to have issues.

Consider that you can move a physical hard drive to another physical machine, and it will still boot to windows, even with hardware differences.

Sorry but this isn’t true always. Maybe your case is a good example for that.
I’ve never heard about porting virtual drives to real boxes.
Good luck.

ps.: If you find the solution, please inform us! Thank you.

I’m sorry, but what do you mean by “the virtualized hardware matches the physical hardware”?

Are you saying your physical machine has the same BIOS, graphics hardware, ethernet chipset etc. etc. as the one VirtualBox tells Windows XP it is using?

Or are you saying Windows should boot because you are trying to make it work on the same physical machine you use VirtualBox on?

The fact that windows won’t boot sounds like it is expecting hardware profile X (the one it had under VirtualBox) but you are giving it hardware profile Y (the hardware your physical machine contains). Windows can get past some hardware differences (eg if you remove an ethernet card from your machine, Windows won’t refuse to boot) but it cannot get past all differences. And it’s probably not booting here because you are essentially doing a “rip & replace” transfer between completely different sets of hardware as far as Windows is concerned.

It sounds like you missed a lot of preparation work before the transfer. I haven’t seen anyone do what you propose, but for example you can use virtualisation to run an on-disk install of Windows (rather than have it installed twice as both a virtualised OS and a dual-boot). But to accomplish that (and I’m positive what you propose as well) you need to setup Windows to have multiple hardware profiles and have it ask you which profile to use before it boots…else it will fail on the second hardware configuration just like your WinXP install is doing now.

At this stage though I don’t understand why you don’t just re-install Windows XP fresh to this other HDD. This isn’t a matter of preserving some warez copy of Windows or other software is it?

ReferenceSeete wrote:

>
> lethlorian;1954140 Wrote:
>> …edited…]
>> The virtualized hardware matches the physical hardware.
>> Since im trying to use the same box, I can’t see any reason for it to
>> have issues.
>>
>> Consider that you can move a physical hard drive to another physical
>> machine, and it will still boot to windows, even with hardware
>> differences.
>
> I’m sorry, but what do you mean by “the virtualized hardware matches
> the physical hardware”?
>
> Are you saying your physical machine has the same BIOS, graphics
> hardware, ethernet chipset etc. etc. as the one VirtualBox tells Windows
> XP it is using?
>
> Or are you saying Windows should boot because you are trying to make it
> work on the same physical machine you use VirtualBox on?
>
> The fact that windows won’t boot sounds like it is expecting hardware
> profile X (the one it had under VirtualBox) but you are giving it
> hardware profile Y (the hardware your physical machine contains).
> Windows can get past some hardware differences (eg if you remove an
> ethernet card from your machine, Windows won’t refuse to boot) but it
> cannot get past all differences. And it’s probably not booting here
> because you are essentially doing a “rip & replace” transfer between
> completely different sets of hardware as far as Windows is concerned.
>
> It sounds like you missed a lot of preparation work before the
> transfer. I haven’t seen anyone do what you propose, but for example
> you can use virtualisation to run an on-disk install of Windows (rather
> than have it installed twice as both a virtualised OS and a dual-boot).
> But to accomplish that (and I’m positive what you propose as well) you
> need to setup Windows to have multiple hardware profiles and have it ask
> you which profile to use before it boots…else it will fail on the
> second hardware configuration just like your WinXP install is doing now.
>
> At this stage though I don’t understand why you don’t just re-install
> Windows XP fresh to this other HDD. This isn’t a matter of preserving
> some warez copy of Windows or other software is it?

You may be able to get past some of the hardware issues (virtual vs. real)
by booting to safe mode - that will usually get around the mismatch in
video cards. I would try it in steps: first boot safe mode to a command
line. If that works, try the next one up which will bring up a vga screen
with no networking and a few other things. Finally, boot to safe mode with
full networking, etc. and try selecting another video card. 50-50 chance
this will get you online. The real deal killer is the disk drive. If you
have SATA drives and your virtual copy of XP wasn’t setup to deal with you
are sol - XP requires a specific SATA driver that is NOT installed (or
available) on the installation CD. You will also have issues with the drive
ID - the physical disk will not match what the virtual disk had even if the
driver is OK. For that, there are third party programs to reset disk ID or
use the XP recovery program to reset it.

Good luck - I agree with ReferenceSeet above that you are way short on
preparation here. This isn’t a trivial exercise but one full of landmines
set by MS to trap piracy.


Will Honea

lethlorian wrote:
> Ive been running VirtualBox with a windows XP installation for some
> time, on an opensuse 11.0 host for some time.
> Recently, however ive been having issues with suse, and want to take my
> virtual XP and make it a primary bootable physical partition, on a
> second disk
>
> I know it can be done, but im not finding how exactly.
>
> What ive tried so far.
> I’ve taken VBoxManage terminal tool and converted the VDI to a .img
> file, and tried to move that to my second physical disk, but it didnt
> work at all.
>
> After some thinking, I booted to acronis true image within my virtual
> machine, and cloned the C:/ drive of windows over to my second hard
> drive.
> That got me further, but doesn’t boot fully.
> Comes up to windows xp logo, and black screen boot loops.
>
> Ive heard about using vditool to create a .raw file, and then go from
> there, but im at a loss to find vdi tool
>
> How can i move my virtual machine to a physical, bootable partition on
> a second drive?
>
>

What you need is the sysprep utility (in support/tools/deploy.cab on the
XP CD - extract sysprep.exe and setupcl.exe to an empty folder). When
you run this, it “unloads” the drivers for the hardware, so the next
boot will have to install the needed drivers.

After running sysprep, shutdown and clone the drive using Acronis, then
try booting from the drive - you will need the necessary drivers
available on disk/CD.


PeeGee

Asus M2V-MX SE, AMD LE1640, openSuSE 11.0 x86-64/XP Home VBox
Asus M2NPV-VM, AMD 64X2 3800+, openSuSE 10.3 x86-64/XP Home dual boot
Asus eeePC 4G (701), Celeron M353, Mandriva 2009.0

Actually this is very simple to accomplish. As stated before you need to unload all the drivers off of the virtual machine. get it back to the standard default drivers that came with it when you first installed the OS. This can be done a few ways but the easiest would be with sysprep (otherwise you an manually uninstall them all… never tried it this way but I suppose that it could work).

After you get it back to the factory defaults it is as simple as cloning the HDD via a program that you can boot into. My personal favourite is Hiren boot CD. I use the Norton Ghost utility off it to create a clone of the virtual HDD onto a DVD. This is accomplished by booting the virtual machine up with the Hiren CD.

With that DVD then I can boot up the physical machine with Hiren go to the Norton Ghost program and then reverse the process uploading the new image off of the DVD onto the HDD.

Overall this process takes about a hour, of course depending on the size of the virtual machine and the speed of the PC that you are using.