VMware has a very good tool called VMware Converter to convert a physical Windows machine into a virtual machine. However, what happens when you want to do the same for a Linux machine? VMware Converter does not support this. Fortunately, there is a way using a live Knoppix CD and netcat.
Before you begin, you will need an extra physical machine running VMware Server which is where you will be cloning the physical machine to. This extra server needs to have enough disk space to create a virtual disk drive that is at least as big as the drive(s) in the physical machine we are cloning. You will also need a copy of the Knoppix live CD iso image, which you can get from http://www.knoppix.net/
To get started, create a new Virtual Machine on the extra machine with a virtual disk drive that is at least as large as the drive in the physical machine we are cloning. Once this is created, mount the Knoppix live CD iso image as the CD-ROM for this virtual machine, and boot it up. The Knoppix live CD should boot, and you should be presented with a nice KDE environment to work from. Make sure the network is working on both machines, and that you can connect to the new virtual machine from the physical machine. Then, you are ready to begin.
On the new virtual machine, start a new console session, elevate yourself to root privileges, and start dd listening through netcat.
sudo su - nc -l -p 9000 | dd of=/dev/sda
Then, on the physical machine, start dd to send the disk image through netcat. NOTE: replace 192.168.1.101 with the IP address of the virtual machine
dd if=/dev/sda | nc 192.168.1.101 9000
This process takes a LONG time, so find something else to do while you wait. Netcat does not automatically stop when dd has completed, so you just have to wait for the dd output on the physical machine to know when it is done. This will look something like this:
16777246+0 records in 16777246+0 records out 8589934592 bytes (8.6 GB) copied, 3397.79 seconds, 2.5 MB/s
Once you see that, hit CTRL+C on the physical machine to end the netcat process. This should also terminate the process on the virtual machine.
That should be it! Reboot the virtual server, and you should have an exact clone of the physical machine, ready to boot. Be careful that you do not create an IP conflict on your network, though. If you are going to be running both copies of the server simultaneously, you will need to reconfigure the network settings on one of them.