- 318,566 hits
Anything about Ubuntu, Centos, openSuSe and Fedora
Thanks to klaus-vb of #vbox channel in freenode.org, this guy gives me a huge help accomplishing this task.
Now back to the topic, I’ve seen several howtos for converting VMDK to VDI and from Physical Drive to Virtual, but after almost a day of research, I can’t find any way to convert an existing virtual VMDK, VDI to physical drive as fast as it can be made. After hanging-out in the #vbox channel in irc.freenode.org, klaus-vb gave me a hint how to accomplish this without a fuss. Here it is:
1. Make sure that the VDI has no current snapshot or whatsoever and it’s currently inactive.
2. In my current example, I’m planning to transfer my Ubuntu 8.04 Server from VDI to Physical Hard Drive.
3. If your currently in the target machine and using recovery liveCD such as systemrescueCD you can execute the following:
VBoxManage -q internalcommands converttoraw /home/username/.VirtualBox/HardDisks/Test.vdi Test.raw dd if=Test.raw of=/dev/sdc bs=64k
Please note of the exact name and target drive.
4. After that modify the physical drive and make the root ( / ) partition bootable and reinstall grub MBR on that drive.
5. You also need to reconfigure the /etc/fstab of the target drive if it doesn’t boot on your initial test.