Skip to main content

V2P (Virtual-to-Physical) for VirtualBox



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

Unknown said…
Two questions:

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
Unknown said…
I need to do a V to P with the Sunbox having the XP Image I have built with Sysprep and Driver packs. I need to change it from a VDI sunbox to work with a physical machine. Anyone have a walk through or how to do this

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?
Can Atuf Kansu said…
Can you give the command for Windows OS also to install the virtual harddrive image to the physical one ?

Popular posts from this blog

Trust, TensorFlow and the Cloud

People are usually honest beings. In fact, the world keeps moving forward in spite of all the scandals, frauds and the corruption because an overwhelming number of us believe in each other, trust each other. It's this same inherent built-in trust that makes us trust our cloud providers. And for the most part, we are not going to be wrong. Trust is a good thing. For our cloud providers, we trust that they aren't reading the memory pages of our containers. We trust that they aren't trying to inject the untrusted arbitrary code during the execution. We trust that they aren't snooping on our workloads just to launch a competitive service on their platform. For most of us, it's not just a simple cautious trust that it should be by default, but rather a complete blind trust. System Enforced Trust Photo by  Benny Meier  on  Unsplash Most of the people understand and respect those lines on the road. They understand going on the other side when you are not sup