Server notes
How to convert your real system to a virtual machine
A whole disk image plus VirtualBox converts an old server into a test machine you can keep after the hardware is gone.
I had a real Linux server that I needed to turn into a virtual server. I wanted to sell the old hardware but keep the system as a backup that could still run. VirtualBox is the free open source virtual computer from Oracle, and it handled the job.
1. Back up the system disk
If possible, move the system disk to another computer. If that is not an option, work from the original system.
Back up the whole disk, not just a partition:
cd /the/path/of/your/backup
cat /dev/sda > ./sda.backup
This creates a raw image of the disk in the backup folder.
2. Convert the image to a virtual disk
VBoxManage convertfromraw ./sda.backup sda.vdi --format vdi
3. Create the virtual machine
- Download, install, and start VirtualBox.
- Create a new machine.
- At the virtual hard disk step, choose Use an existing virtual hard disk file.
- Select
sda.vdi.
Boot the machine and check the network adapter. The old system may still expect the hardware it was installed on, so keep a console open for the first boot.