How to migrate physical Debian installation into VirtualBox image

You can use the VMware Converter to get a copy of a (running) physical machine. The resulting image can be user natively by current VirtualBox releases.


One way should be just to take image of your server with the good old dd:

dd if=/dev/sda of=/path/to/somewhere/with/lots/of/diskspace/serverimage.dd bs=1M

(assuming your server HD is /dev/sda)

And then convert the dd image to VirtualBox image using VBoxManage:

VBoxManage convertfromraw serverimage.dd serverimage.vdi

Then just add that as your virtual server HD from VirtualBox GUI and you should be all set.