How to convert your real system to virtual machine?

I had a real Linux server system that I need to convert into virtual server, because I wanted to sell my old hardware, but I needed the system as backup. This backup is able to run as virtual server. This is a very useful backup method. This tutorial show you how you can convert your whole system into virtualbox system. Virtualbox is a free opensource virtual computer solution from Oracle.

1. Backup your system disk

If you can, put your system disk to another computer. But if you can’t do it you can do it the original system.

Backup you hard disk (not just your partition) with the following command:

cd /the/path/of/your/backup
cat /dev/sda >./sda.backup

This command makes you a hard drive image in /the/path/of/your/backup folder.

2. Convert your hard disk image into virtual hard disk

Convert your hard drive backup:

VBoxManage convertfromraw ./sda.backup sda.vdi --format vdi

3. Create new virtual machine

Download, install and start VirtualBox. Push the New button. At the settings of virtual hard disk choose “use existing hard disk” option and select your new sda.vdi virtual hard disk image.


Read more posts by this author.