So you might have had a great Virtual Machine which has your development environment or maybe a specific build environment. You think the time has come now to free this VM and give its own dedicated hardware. Or even none of the above is true, you want to do it because you can :)
You will have to go do what is called as v2p (Virtual to Physical) migration. So let's just think about what exactly we are trying to do. We have Virtual Machine running inside a VirtualBox which has its own virtual hard disk. The converting a virtual machine to a physical machine is mainly about changing this virtual machine operating system boot from a physical real hard disk than virtual hard disk on which it was running when inside VirtualBox.
VirtualBox comes with one hidden command under its hood, convettoraw! This can be used in the following manner,
VBoxMange internal commands converttoraw your.vdi your.raw
So now you have a raw image of your VM (pleaes note that if you have a VM of say, 16GB dynamically expandable virtual hard disk when you create a raw image it will actually create a file which will occupy 16GB on your disk! so make sure you have that much of space on your disk before proceeding). Now, this raw image can be deployed to another disk very easily.
Connect the disk on which you want to deploy the raw image that you just created to your existing system. Now depending upon on the Operating system that you are running the actual command may vary. I will pick Linux as my host operating system on which I will assume the VirtaulBox is running. So this second physical disk appears as /dev/sdb on my Linux box, so I execute,
dd if=/location-of-your-raw of=/dev/sdb
Once its done, connect this disk as the primary master to the system that you are planning run. At first, boot, make sure the system is started with -r option to re-configure the devices.
Comments
1. The row image (dd) obtained can be deployed on partition instead of entire disk?
2. What about windows xp? Do I need some extra things go get running?
Regards
Sun Virtutalbox (windows XP and Window 7 build machines, working great)
I have already set them to install drivers on 1st boot and they will sysprep on 1st boot. This works great p to p but I want to build the images on the VBox and move it to a phsyical computer. (I can already boot into a BartPe /Live Cd with ghost to ghost over the image, but it will crash on me.
Need help anyone?